Skip to content

Adding the ability to specify the tail of an annotation arrow in abso… #610

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 20 commits into from
Jun 20, 2016
Merged
Changes from 1 commit
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
ed8295a
Adding the ability to specify the tail of an annotation arrow in abso…
Jun 3, 2016
a2e9c72
Adding the ability to specify the tail of an annotation arrow in abso…
Jun 3, 2016
8fcb9dd
Merge remote-tracking branch 'origin/trendline' into trendline
Jun 5, 2016
a7e0e88
Fixing text and editing.
Jun 7, 2016
722a1ca
code review feedback
Jun 7, 2016
a1da755
Adding the ability to specify the tail of an annotation arrow in abso…
Jun 7, 2016
a2ecd65
Adding the ability to specify the tail of an annotation arrow in abso…
Jun 7, 2016
8697050
Merge remote-tracking branch 'origin/trendline' into trendline
Jun 7, 2016
49d9c7e
Trying to fix tests for absolutetail.
Jun 7, 2016
91dd08a
Removing these unit tests because they are of dubious value relative …
Jun 7, 2016
dbdcaac
fixing the unit tests for annotations and adding them back.
Jun 7, 2016
253a3fa
fixing timezone problem in annotations test.
Jun 7, 2016
4aa569d
fixing lint for annotation tests.
Jun 7, 2016
a008354
Switching absolutetail to axref, ayref based on code review feedback.…
Jun 14, 2016
925360f
Merge remote-tracking branch 'upstream/master' into trendline
Jun 14, 2016
3a827a6
Merge remote-tracking branch 'origin/absolutetail' into absolutetail
Jun 14, 2016
d07b676
somehow I lost this change in my screw up with the branches.
Jun 14, 2016
143328d
Not hardcoding axis references but using regex and coerce. Purposeful…
Jun 14, 2016
e83b947
Fixing bug where annotation would be marked as offscreen if the head …
Jun 16, 2016
9358a56
Fixing a bug where the x,y of the arrow would be changed to stay on t…
Jun 20, 2016
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
12 changes: 10 additions & 2 deletions src/components/annotations/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -446,8 +446,16 @@ annotations.draw = function(gd, index, opt, value) {
// anyway to get its bounding box)
if(!ax.autorange && ((options[axLetter] - ax.range[0]) *
(options[axLetter] - ax.range[1]) > 0)) {
annotationIsOffscreen = true;
return;
if(options['a' + axLetter + 'ref'] === axRef) {
if((options['a' + axLetter] - ax.range[0]) *
(options['a' + axLetter] - ax.range[1]) > 0) {
annotationIsOffscreen = true;
}
} else {
annotationIsOffscreen = true;
}

if(annotationIsOffscreen) return;
Copy link
Contributor

Choose a reason for hiding this comment

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

Hmm. Something isn't quite right still:

gifrecord_2016-06-17_170451

The arrow tip gets pinned to the graph's right edge.

Copy link
Author

Choose a reason for hiding this comment

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

@etpinard sigh...its happening because its coming up against the edge of the svg-container. In my testing, that didn't happen before the tail exited the chart so i didn't see it. I'm sorry about that. I believe that I've fixed it and I've added an off screen to the test to ensure it stays that way.

}
annPosPx[axLetter] = ax._offset + ax.l2p(options[axLetter]);
alignPosition = 0.5;
Expand Down