File tree Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -117,20 +117,17 @@ fx.init = function(gd) {
117117 // This is on `gd._fullLayout`, *not* fullLayout because the reference
118118 // changes by the time this is called again.
119119 gd . _fullLayout . _rehover = function ( ) {
120- if ( gd . _fullLayout . _hoversubplot === plotinfo . id ) {
120+ if ( gd . _fullLayout . _hoversubplot === subplot ) {
121121 fx . hover ( gd , evt , subplot ) ;
122122 }
123123 } ;
124124
125- // Track the hovered subplot. This prevents rehover from accidetally
126- // reapplying a hover label after the mouse has left the plot or if
127- // the mouse has entered another subplot.
128- gd . _fullLayout . _hoversubplot = plotinfo . id ;
125+ fx . hover ( gd , evt , subplot ) ;
129126
130- gd . _fullLayout . _rehover ( ) ;
131-
132- fullLayout . _lasthover = maindrag ;
133- fullLayout . _hoversubplot = subplot ;
127+ // Not that we have *not* used the cached fullLayout variable here
128+ // since that may be outdated when this is called as a callback later on
129+ gd . _fullLayout . _lasthover = maindrag ;
130+ gd . _fullLayout . _hoversubplot = subplot ;
134131 } ;
135132
136133 /*
You can’t perform that action at this time.
0 commit comments