-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Negate axis offset and then turn it into a string #2339
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
Conversation
@@ -328,12 +328,12 @@ proto.adjustLayout = function(ternaryLayout, graphSize) { | |||
_this.layers.bgrid.attr('transform', bTransform); | |||
|
|||
var aTransform = 'translate(' + (x0 + w / 2) + ',' + y0 + | |||
')rotate(30)translate(0,-' + aaxis._offset + ')'; | |||
')rotate(30)translate(0,' + -aaxis._offset + ')'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When _offset
is negative we use to get:
that is, a double -
in the translate transform string.
Looks like [email protected]
doesn't care, so this went unnoticed in our image tests.
Great, was hoping it would be that simple - does this fix the hover labels too? A |
This one is bit tricky, Clearly those odd-looking arrow need to go. But I ask: should |
I think anything that's not explicitly |
Sounds good. Let me fix that in this PR. |
- throws errors in strict-d3 w/o latest patch in ternary.js - note that strict-d3 does not throw in the nw.js imagetest container for some reason.
@alexcjohnson if you're looking to fix an easy (I think) bug before the I have to keep working on the |
@@ -203,6 +205,8 @@ function _hover(gd, evt, subplot, noHoverEvent) { | |||
|
|||
var hovermode = evt.hovermode || fullLayout.hovermode; | |||
|
|||
if(hovermode && !supportsCompare) hovermode = 'closest'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The second part of #2338 - fixes hover labels for geo and ternary on the plot_types
mock
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Not sure what's the best to 🔒 this down?
Maybe just checking that hovermode: 'x'
behaves the same as hovermode: 'closest'
in a cartesian + geo (or ternary or polar) graph would suffice.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good call -> 16b01f0
} | ||
addGroup(dragModeGroup); | ||
addGroup(zoomGroup.concat(resetGroup)); | ||
addGroup(hoverGroup); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice cleanup. Looking good!
Nicely done 💃 |
Likewise, 💃 on the |
fixes #2338
Not 100% sure how to test this. There's probably a way to add a check in
d3-strict
? But maybe just a jasmine test that doesn't fail would do the trick.cc @alexcjohnson