-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Ensure winning points of hover are listed first when hoversubplots
is set to "axis" and sorting by distance
#6963
Conversation
- resolved conflicts in test/jasmine/tests/hover_label_test.js
@@ -700,9 +713,23 @@ function _hover(gd, evt, subplot, noHoverEvent, eventTarget) { | |||
gd._spikepoints = newspikepoints; | |||
|
|||
var sortHoverData = function() { |
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.
@archmoj Could you add a comment here explaining the new sorting logic?
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 sorting keep the points in the main subplot at the top | ||
// then add points in other subplots | ||
|
||
var hoverDataInSubplot = hoverData.filter(function(a) { |
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.
naming suggestion -- should these functions be called hoverDataInMainSubplot
and hoverDataNotInMainSubplot
then?
Fixes #6960.
@plotly/plotly_js