@@ -34,7 +34,6 @@ plots.fontWeight = 'normal';
34
34
var subplotsRegistry = plots . subplotsRegistry ;
35
35
var transformsRegistry = plots . transformsRegistry ;
36
36
37
-
38
37
var ErrorBars = require ( '../components/errorbars' ) ;
39
38
40
39
/**
@@ -1388,6 +1387,22 @@ plots.transition = function(gd, data, layout, traceIndices, frameOpts, transitio
1388
1387
Lib . extendDeepNoArrays ( gd . data [ traceIndices [ i ] ] , update ) ;
1389
1388
}
1390
1389
1390
+ // Follow the same procedure. Clone it so we don't mangle the input, then
1391
+ // expand any object paths so we can merge deep into gd.layout:
1392
+ var layoutUpdate = Lib . expandObjectPaths ( Lib . extendDeepNoArrays ( { } , layout ) ) ;
1393
+
1394
+ // Before merging though, we need to modify the incoming layout. We only
1395
+ // know how to *transition* layout ranges, so it's imperative that a new
1396
+ // range not be sent to the layout before the transition has started. So
1397
+ // we must remove the things we can transition:
1398
+ var axisAttrRe = / ^ [ x y ] a x i s [ 0 - 9 ] * $ / ;
1399
+ for ( var attr in layoutUpdate ) {
1400
+ if ( ! axisAttrRe . test ( attr ) ) continue ;
1401
+ delete layoutUpdate [ attr ] . range ;
1402
+ }
1403
+
1404
+ Lib . extendDeepNoArrays ( gd . layout , layoutUpdate ) ;
1405
+
1391
1406
// Supply defaults after applying the incoming properties. Note that any attempt
1392
1407
// to simplify this step and reduce the amount of work resulted in the reconstruction
1393
1408
// of essentially the whole supplyDefaults step, so that it seems sensible to just use
0 commit comments