@@ -2202,7 +2202,7 @@ plots.transition = function(gd, data, layout, traces, frameOpts, transitionOpts)
22022202 // There's nothing to do if this module is not defined:
22032203 if ( ! module ) continue ;
22042204
2205- // Don't register the trace as transitioned if it doens 't know what to do.
2205+ // Don't register the trace as transitioned if it doesn 't know what to do.
22062206 // If it *is* registered, it will receive a callback that it's responsible
22072207 // for calling in order to register the transition as having completed.
22082208 if ( module . animatable ) {
@@ -2238,9 +2238,8 @@ plots.transition = function(gd, data, layout, traces, frameOpts, transitionOpts)
22382238 delete gd . calcdata ;
22392239
22402240 plots . supplyDefaults ( gd ) ;
2241-
22422241 plots . doCalcdata ( gd ) ;
2243-
2242+ plots . doSetPositions ( gd ) ;
22442243 Registry . getComponentMethod ( 'errorbars' , 'calc' ) ( gd ) ;
22452244
22462245 return Promise . resolve ( ) ;
@@ -2265,7 +2264,6 @@ plots.transition = function(gd, data, layout, traces, frameOpts, transitionOpts)
22652264 var aborted = false ;
22662265
22672266 function executeTransitions ( ) {
2268-
22692267 gd . emit ( 'plotly_transitioning' , [ ] ) ;
22702268
22712269 return new Promise ( function ( resolve ) {
@@ -2333,6 +2331,9 @@ plots.transition = function(gd, data, layout, traces, frameOpts, transitionOpts)
23332331 if ( hasAxisTransition ) {
23342332 traceTransitionOpts = Lib . extendFlat ( { } , transitionOpts ) ;
23352333 traceTransitionOpts . duration = 0 ;
2334+ // This means do not transition traces,
2335+ // this happens on layout-only (e.g. axis range) animations
2336+ transitionedTraces = null ;
23362337 } else {
23372338 traceTransitionOpts = transitionOpts ;
23382339 }
@@ -2561,6 +2562,30 @@ function clearAxesCalc(axList) {
25612562 }
25622563}
25632564
2565+ plots . doSetPositions = function ( gd ) {
2566+ var fullLayout = gd . _fullLayout ;
2567+ var subplots = fullLayout . _subplots . cartesian ;
2568+ var modules = fullLayout . _modules ;
2569+ var methods = [ ] ;
2570+ var i , j ;
2571+
2572+ // position and range calculations for traces that
2573+ // depend on each other ie bars (stacked or grouped)
2574+ // and boxes (grouped) push each other out of the way
2575+
2576+ for ( j = 0 ; j < modules . length ; j ++ ) {
2577+ Lib . pushUnique ( methods , modules [ j ] . setPositions ) ;
2578+ }
2579+ if ( ! methods . length ) return ;
2580+
2581+ for ( i = 0 ; i < subplots . length ; i ++ ) {
2582+ var subplotInfo = fullLayout . _plots [ subplots [ i ] ] ;
2583+ for ( j = 0 ; j < methods . length ; j ++ ) {
2584+ methods [ j ] ( gd , subplotInfo ) ;
2585+ }
2586+ }
2587+ } ;
2588+
25642589plots . rehover = function ( gd ) {
25652590 if ( gd . _fullLayout . _rehover ) {
25662591 gd . _fullLayout . _rehover ( ) ;
0 commit comments