@@ -2236,8 +2236,6 @@ plots.transition = function(gd, data, layout, traces, frameOpts, transitionOpts)
22362236
22372237 plots . supplyDefaults ( gd ) ;
22382238 plots . doCalcdata ( gd ) ;
2239- plots . doCrossTraceCalc ( gd ) ;
2240- Registry . getComponentMethod ( 'errorbars' , 'calc' ) ( gd ) ;
22412239
22422240 return Promise . resolve ( ) ;
22432241 }
@@ -2503,8 +2501,6 @@ plots.doCalcdata = function(gd, traces) {
25032501 // clear stuff that should recomputed in 'regular' loop
25042502 if ( hasCalcTransform ) clearAxesCalc ( axList ) ;
25052503
2506- var calcInteractionsFuncs = [ ] ;
2507-
25082504 function calci ( i , isContainer ) {
25092505 trace = fullData [ i ] ;
25102506 _module = trace . _module ;
@@ -2530,12 +2526,6 @@ plots.doCalcdata = function(gd, traces) {
25302526
25312527 if ( _module && _module . calc ) {
25322528 cd = _module . calc ( gd , trace ) ;
2533-
2534- // Some modules need to update traces' calcdata after
2535- // *all* traces have been through calc - so later traces can
2536- // impact earlier traces.
2537- var calcInteractions = _module . calcInteractions ;
2538- if ( calcInteractions ) Lib . pushUnique ( calcInteractionsFuncs , calcInteractions ) ;
25392529 }
25402530 }
25412531
@@ -2561,9 +2551,10 @@ plots.doCalcdata = function(gd, traces) {
25612551 for ( i = 0 ; i < fullData . length ; i ++ ) calci ( i , true ) ;
25622552 for ( i = 0 ; i < fullData . length ; i ++ ) calci ( i , false ) ;
25632553
2564- for ( i = 0 ; i < calcInteractionsFuncs . length ; i ++ ) calcInteractionsFuncs [ i ] ( gd , calcdata ) ;
2554+ plots . doCrossTraceCalc ( gd ) ;
25652555
25662556 Registry . getComponentMethod ( 'fx' , 'calc' ) ( gd ) ;
2557+ Registry . getComponentMethod ( 'errorbars' , 'calc' ) ( gd ) ;
25672558} ;
25682559
25692560function clearAxesCalc ( axList ) {
@@ -2599,14 +2590,21 @@ plots.doCrossTraceCalc = function(gd) {
25992590 var methods = hash [ k ] ;
26002591 var subplots = fullLayout . _subplots [ k ] ;
26012592
2602- for ( i = 0 ; i < subplots . length ; i ++ ) {
2603- var sp = subplots [ i ] ;
2604- var spInfo = k === 'cartesian' ?
2605- fullLayout . _plots [ sp ] :
2606- fullLayout [ sp ] ;
2593+ if ( Array . isArray ( subplots ) ) {
2594+ for ( i = 0 ; i < subplots . length ; i ++ ) {
2595+ var sp = subplots [ i ] ;
2596+ var spInfo = k === 'cartesian' ?
2597+ fullLayout . _plots [ sp ] :
2598+ fullLayout [ sp ] ;
26072599
2600+ for ( j = 0 ; j < methods . length ; j ++ ) {
2601+ methods [ j ] ( gd , spInfo ) ;
2602+ }
2603+ }
2604+ }
2605+ else {
26082606 for ( j = 0 ; j < methods . length ; j ++ ) {
2609- methods [ j ] ( gd , spInfo ) ;
2607+ methods [ j ] ( gd ) ;
26102608 }
26112609 }
26122610 }
0 commit comments