Skip to content

Annotation additions: standoff, anchor with arrow, clicktoshow #1265

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 14 commits into from
Jan 18, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/components/annotations/calc_autorange.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ function annAutorange(gd) {
// relative to their anchor points
// use the arrow and the text bg rectangle,
// as the whole anno may include hidden text in its bbox
fullLayout.annotations.forEach(function(ann) {
Lib.filterVisible(fullLayout.annotations).forEach(function(ann) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lib.filterVisible was unnecessary before because we didn't coerce any other attributes when visible was false, so these annotations wouldn't look like they're on axes. But now I need the position and reference attributes even when annotations aren't visible in order to determine what to show on clicks, hence this filter is needed too.

var xa = Axes.getFromId(gd, ann.xref),
ya = Axes.getFromId(gd, ann.yref),
headSize = 3 * ann.arrowsize * ann.arrowwidth || 0;
Expand Down