@@ -268,7 +268,7 @@ function _hover(gd, evt, subplot, noHoverEvent) {
268
268
// mapped onto each of the currently selected overlaid subplots
269
269
var xvalArray , yvalArray ;
270
270
271
- var itemnum , curvenum , cd , trace , subplotId , subploti , mode ,
271
+ var itemnum , curvenum , cd , trace , subplotId , subploti , _mode ,
272
272
xval , yval , pointData , closedataPreviousLength ;
273
273
274
274
// spikePoints: the set of candidate points we've found to draw spikes to
@@ -403,9 +403,9 @@ function _hover(gd, evt, subplot, noHoverEvent) {
403
403
}
404
404
405
405
// within one trace mode can sometimes be overridden
406
- mode = hovermode ;
407
- if ( helpers . isUnifiedHover ( mode ) ) {
408
- mode = mode . charAt ( 0 ) ;
406
+ _mode = hovermode ;
407
+ if ( helpers . isUnifiedHover ( _mode ) ) {
408
+ _mode = _mode . charAt ( 0 ) ;
409
409
}
410
410
411
411
// container for new point, also used to pass info into module.hoverPoints
@@ -463,20 +463,20 @@ function _hover(gd, evt, subplot, noHoverEvent) {
463
463
464
464
// for a highlighting array, figure out what
465
465
// we're searching for with this element
466
- if ( mode === 'array' ) {
466
+ if ( _mode === 'array' ) {
467
467
var selection = evt [ curvenum ] ;
468
468
if ( 'pointNumber' in selection ) {
469
469
pointData . index = selection . pointNumber ;
470
- mode = 'closest' ;
470
+ _mode = 'closest' ;
471
471
} else {
472
- mode = '' ;
472
+ _mode = '' ;
473
473
if ( 'xval' in selection ) {
474
474
xval = selection . xval ;
475
- mode = 'x' ;
475
+ _mode = 'x' ;
476
476
}
477
477
if ( 'yval' in selection ) {
478
478
yval = selection . yval ;
479
- mode = mode ? 'closest' : 'y' ;
479
+ _mode = _mode ? 'closest' : 'y' ;
480
480
}
481
481
}
482
482
} else if ( customXVal !== undefined && customYVal !== undefined ) {
@@ -490,7 +490,7 @@ function _hover(gd, evt, subplot, noHoverEvent) {
490
490
// Now if there is range to look in, find the points to hover.
491
491
if ( hoverdistance !== 0 ) {
492
492
if ( trace . _module && trace . _module . hoverPoints ) {
493
- var newPoints = trace . _module . hoverPoints ( pointData , xval , yval , mode , {
493
+ var newPoints = trace . _module . hoverPoints ( pointData , xval , yval , _mode , {
494
494
hoverLayer : fullLayout . _hoverlayer
495
495
} ) ;
496
496
@@ -650,7 +650,7 @@ function _hover(gd, evt, subplot, noHoverEvent) {
650
650
651
651
// If in compare mode, select every point at position
652
652
if (
653
- helpers . isXYhover ( mode ) &&
653
+ helpers . isXYhover ( _mode ) &&
654
654
hoverData [ 0 ] . length !== 0 &&
655
655
hoverData [ 0 ] . trace . type !== 'splom' // TODO: add support for splom
656
656
) {
0 commit comments