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) {
117
117
// This is on `gd._fullLayout`, *not* fullLayout because the reference
118
118
// changes by the time this is called again.
119
119
gd . _fullLayout . _rehover = function ( ) {
120
- if ( gd . _fullLayout . _hoversubplot === plotinfo . id ) {
120
+ if ( gd . _fullLayout . _hoversubplot === subplot ) {
121
121
fx . hover ( gd , evt , subplot ) ;
122
122
}
123
123
} ;
124
124
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 ) ;
129
126
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 ;
134
131
} ;
135
132
136
133
/*
You can’t perform that action at this time.
0 commit comments