@@ -369,7 +369,7 @@ plots.supplyDefaults = function(gd) {
369
369
370
370
// then do the data
371
371
newFullLayout . _globalTransforms = ( gd . _context || { } ) . globalTransforms ;
372
- plots . supplyDataDefaults ( newData , newFullData , newFullLayout ) ;
372
+ plots . supplyDataDefaults ( newData , newFullData , newLayout , newFullLayout ) ;
373
373
374
374
// attach helper method to check whether a plot type is present on graph
375
375
newFullLayout . _has = plots . _hasPlotType . bind ( newFullLayout ) ;
@@ -593,9 +593,9 @@ plots.linkSubplots = function(newFullData, newFullLayout, oldFullData, oldFullLa
593
593
}
594
594
} ;
595
595
596
- plots . supplyDataDefaults = function ( dataIn , dataOut , layout ) {
597
- var modules = layout . _modules = [ ] ,
598
- basePlotModules = layout . _basePlotModules = [ ] ,
596
+ plots . supplyDataDefaults = function ( dataIn , dataOut , layout , fullLayout ) {
597
+ var modules = fullLayout . _modules = [ ] ,
598
+ basePlotModules = fullLayout . _basePlotModules = [ ] ,
599
599
cnt = 0 ;
600
600
601
601
function pushModule ( fullTrace ) {
@@ -612,18 +612,18 @@ plots.supplyDataDefaults = function(dataIn, dataOut, layout) {
612
612
613
613
for ( var i = 0 ; i < dataIn . length ; i ++ ) {
614
614
var trace = dataIn [ i ] ,
615
- fullTrace = plots . supplyTraceDefaults ( trace , cnt , layout ) ;
615
+ fullTrace = plots . supplyTraceDefaults ( trace , cnt , fullLayout ) ;
616
616
617
617
fullTrace . index = i ;
618
618
fullTrace . _input = trace ;
619
619
fullTrace . _expandedIndex = cnt ;
620
620
621
621
if ( fullTrace . transforms && fullTrace . transforms . length ) {
622
- var expandedTraces = applyTransforms ( fullTrace , dataOut , layout ) ;
622
+ var expandedTraces = applyTransforms ( fullTrace , dataOut , layout , fullLayout ) ;
623
623
624
624
for ( var j = 0 ; j < expandedTraces . length ; j ++ ) {
625
625
var expandedTrace = expandedTraces [ j ] ,
626
- fullExpandedTrace = plots . supplyTraceDefaults ( expandedTrace , cnt , layout ) ;
626
+ fullExpandedTrace = plots . supplyTraceDefaults ( expandedTrace , cnt , fullLayout ) ;
627
627
628
628
// mutate uid here using parent uid and expanded index
629
629
// to promote consistency between update calls
@@ -816,7 +816,7 @@ function supplyTransformDefaults(traceIn, traceOut, layout) {
816
816
}
817
817
}
818
818
819
- function applyTransforms ( fullTrace , fullData , layout ) {
819
+ function applyTransforms ( fullTrace , fullData , layout , fullLayout ) {
820
820
var container = fullTrace . transforms ,
821
821
dataOut = [ fullTrace ] ;
822
822
@@ -830,6 +830,7 @@ function applyTransforms(fullTrace, fullData, layout) {
830
830
fullTrace : fullTrace ,
831
831
fullData : fullData ,
832
832
layout : layout ,
833
+ fullLayout : fullLayout ,
833
834
transformIndex : i
834
835
} ) ;
835
836
}
0 commit comments