@@ -2172,7 +2172,6 @@ Plotly.relayout = function relayout(gd, astr, val) {
2172
2172
doplot = false ,
2173
2173
docalc = false ,
2174
2174
domodebar = false ,
2175
- doSceneDragmode = false ,
2176
2175
newkey , axes , keys , xyref , scene , axisAttr ;
2177
2176
2178
2177
if ( typeof astr === 'string' ) aobj [ astr ] = val ;
@@ -2406,8 +2405,7 @@ Plotly.relayout = function relayout(gd, astr, val) {
2406
2405
* height, width, autosize get dealt with below. Except for the case of
2407
2406
* of subplots - scenes - which require scene.handleDragmode to be called.
2408
2407
*/
2409
- else if ( ai === 'hovermode' ) domodebar = true ;
2410
- else if ( ai === 'dragmode' ) doSceneDragmode = true ;
2408
+ else if ( [ 'hovermode' , 'dragmode' ] . indexOf ( ai ) !== - 1 ) domodebar = true ;
2411
2409
else if ( [ 'hovermode' , 'dragmode' , 'height' ,
2412
2410
'width' , 'autosize' ] . indexOf ( ai ) === - 1 ) {
2413
2411
doplot = true ;
@@ -2466,10 +2464,10 @@ Plotly.relayout = function relayout(gd, astr, val) {
2466
2464
}
2467
2465
2468
2466
// this is decoupled enough it doesn't need async regardless
2469
- if ( domodebar ) manageModebar ( gd ) ;
2467
+ if ( domodebar ) {
2468
+ manageModebar ( gd ) ;
2470
2469
2471
- var subplotIds ;
2472
- if ( doSceneDragmode || domodebar ) {
2470
+ var subplotIds ;
2473
2471
subplotIds = plots . getSubplotIds ( fullLayout , 'gl3d' ) ;
2474
2472
for ( i = 0 ; i < subplotIds . length ; i ++ ) {
2475
2473
scene = fullLayout [ subplotIds [ i ] ] . _scene ;
0 commit comments