Skip to content

Commit 7e787ad

Browse files
committed
spikeline: handle spikedistance set to -1 separately
1 parent 9738074 commit 7e787ad

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/fx/hover.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -549,7 +549,7 @@ function _hover(gd, evt, subplot, noHoverEvent) {
549549
var thisSpikeDistance;
550550
for(var i = 0; i < pointsData.length; i++) {
551551
thisSpikeDistance = pointsData[i].spikeDistance;
552-
if(thisSpikeDistance <= minDistance && thisSpikeDistance <= spikedistance) {
552+
if(spikedistance === Infinity || (thisSpikeDistance < minDistance && thisSpikeDistance <= spikedistance)) {
553553
resultPoint = pointsData[i];
554554
minDistance = thisSpikeDistance;
555555
}

0 commit comments

Comments
 (0)