@@ -2202,7 +2202,7 @@ plots.transition = function(gd, data, layout, traces, frameOpts, transitionOpts)
2202
2202
// There's nothing to do if this module is not defined:
2203
2203
if ( ! module ) continue ;
2204
2204
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.
2206
2206
// If it *is* registered, it will receive a callback that it's responsible
2207
2207
// for calling in order to register the transition as having completed.
2208
2208
if ( module . animatable ) {
@@ -2238,9 +2238,8 @@ plots.transition = function(gd, data, layout, traces, frameOpts, transitionOpts)
2238
2238
delete gd . calcdata ;
2239
2239
2240
2240
plots . supplyDefaults ( gd ) ;
2241
-
2242
2241
plots . doCalcdata ( gd ) ;
2243
-
2242
+ plots . doSetPositions ( gd ) ;
2244
2243
Registry . getComponentMethod ( 'errorbars' , 'calc' ) ( gd ) ;
2245
2244
2246
2245
return Promise . resolve ( ) ;
@@ -2265,7 +2264,6 @@ plots.transition = function(gd, data, layout, traces, frameOpts, transitionOpts)
2265
2264
var aborted = false ;
2266
2265
2267
2266
function executeTransitions ( ) {
2268
-
2269
2267
gd . emit ( 'plotly_transitioning' , [ ] ) ;
2270
2268
2271
2269
return new Promise ( function ( resolve ) {
@@ -2333,6 +2331,9 @@ plots.transition = function(gd, data, layout, traces, frameOpts, transitionOpts)
2333
2331
if ( hasAxisTransition ) {
2334
2332
traceTransitionOpts = Lib . extendFlat ( { } , transitionOpts ) ;
2335
2333
traceTransitionOpts . duration = 0 ;
2334
+ // This means do not transition traces,
2335
+ // this happens on layout-only (e.g. axis range) animations
2336
+ transitionedTraces = null ;
2336
2337
} else {
2337
2338
traceTransitionOpts = transitionOpts ;
2338
2339
}
@@ -2561,6 +2562,30 @@ function clearAxesCalc(axList) {
2561
2562
}
2562
2563
}
2563
2564
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
+
2564
2589
plots . rehover = function ( gd ) {
2565
2590
if ( gd . _fullLayout . _rehover ) {
2566
2591
gd . _fullLayout . _rehover ( ) ;
0 commit comments