Skip to content

Commit 4adce69

Browse files
committed
plots: create _transitionData before supplyLayoutModuleDefaults
- and pass it to supplyLayoutModuleDefaults
1 parent 38aa4b3 commit 4adce69

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

src/plots/plots.js

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -375,6 +375,9 @@ plots.supplyDefaults = function(gd) {
375375

376376
var i;
377377

378+
// Create all the storage space for frames, but only if doesn't already exist
379+
if(!gd._transitionData) plots.createTransitionData(gd);
380+
378381
// first fill in what we can of layout without looking at data
379382
// because fullData needs a few things from layout
380383

@@ -435,7 +438,7 @@ plots.supplyDefaults = function(gd) {
435438
}
436439

437440
// finally, fill in the pieces of layout that may need to look at data
438-
plots.supplyLayoutModuleDefaults(newLayout, newFullLayout, newFullData);
441+
plots.supplyLayoutModuleDefaults(newLayout, newFullLayout, newFullData, gd._transitionData);
439442

440443
// TODO remove in v2.0.0
441444
// add has-plot-type refs to fullLayout for backward compatibility
@@ -474,12 +477,6 @@ plots.supplyDefaults = function(gd) {
474477
(gd.calcdata[i][0] || {}).trace = trace;
475478
}
476479
}
477-
478-
// Create all the storage space for frames, but only if doesn't already
479-
// exist:
480-
if(!gd._transitionData) {
481-
plots.createTransitionData(gd);
482-
}
483480
};
484481

485482
// Create storage for all of the data related to frames and transitions:
@@ -1032,7 +1029,7 @@ function calculateReservedMargins(margins) {
10321029
return resultingMargin;
10331030
}
10341031

1035-
plots.supplyLayoutModuleDefaults = function(layoutIn, layoutOut, fullData) {
1032+
plots.supplyLayoutModuleDefaults = function(layoutIn, layoutOut, fullData, transitionData) {
10361033
var i, _module;
10371034

10381035
// can't be be part of basePlotModules loop

0 commit comments

Comments
 (0)