Skip to content

Commit c6260e3

Browse files
committed
order hover data to possibly get a non-period point as the winning point
1 parent c96bf99 commit c6260e3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/components/fx/hover.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -640,6 +640,9 @@ function _hover(gd, evt, subplot, noHoverEvent) {
640640

641641
hoverData.sort(function(d1, d2) { return d1.distance - d2.distance; });
642642

643+
// move period positioned points to the end of list
644+
orderPeriod(hoverData, hovermode);
645+
643646
// If in compare mode, select every point at position
644647
if(
645648
helpers.isXYhover(mode) &&
@@ -680,9 +683,6 @@ function _hover(gd, evt, subplot, noHoverEvent) {
680683
});
681684
}
682685

683-
// move period positioned points to the end of list
684-
orderPeriod(hoverData, hovermode);
685-
686686
// lastly, emit custom hover/unhover events
687687
var oldhoverdata = gd._hoverdata;
688688
var newhoverdata = [];

0 commit comments

Comments
 (0)