Skip to content

Commit 3ed69b1

Browse files
committed
autosize: revert change of variable name
1 parent 0c316ba commit 3ed69b1

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

src/plots/plots.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,7 @@ plots.sendDataToCloud = function(gd) {
464464
plots.supplyDefaults = function(gd) {
465465
var oldFullLayout = gd._fullLayout || {},
466466
newFullLayout = gd._fullLayout = {},
467-
layout = gd.layout || {};
467+
newLayout = gd.layout || {};
468468

469469
var oldFullData = gd._fullData || [],
470470
newFullData = gd._fullData = [],
@@ -483,20 +483,20 @@ plots.supplyDefaults = function(gd) {
483483
var oldWidth = oldFullLayout.width,
484484
oldHeight = oldFullLayout.height;
485485

486-
plots.supplyLayoutGlobalDefaults(layout, newFullLayout);
486+
plots.supplyLayoutGlobalDefaults(newLayout, newFullLayout);
487487

488-
if(!layout.width) newFullLayout.width = oldWidth;
489-
if(!layout.height) newFullLayout.height = oldHeight;
488+
if(!newLayout.width) newFullLayout.width = oldWidth;
489+
if(!newLayout.height) newFullLayout.height = oldHeight;
490490
}
491491
else {
492492
// coerce the updated layout and autosize if needed
493-
plots.supplyLayoutGlobalDefaults(layout, newFullLayout);
493+
plots.supplyLayoutGlobalDefaults(newLayout, newFullLayout);
494494

495-
var missingWidthOrHeight = (!layout.width || !layout.height),
496-
autosize = layout.autosize,
495+
var missingWidthOrHeight = (!newLayout.width || !newLayout.height),
496+
autosize = newLayout.autosize,
497497
autosizable = gd._context && gd._context.autosizable,
498498
initialAutoSize = missingWidthOrHeight && (autosize || autosizable);
499-
if(initialAutoSize) plots.plotAutoSize(gd, layout, newFullLayout);
499+
if(initialAutoSize) plots.plotAutoSize(gd, newLayout, newFullLayout);
500500
}
501501

502502
newFullLayout._initialAutoSizeIsDone = true;
@@ -536,7 +536,7 @@ plots.supplyDefaults = function(gd) {
536536
}
537537

538538
// finally, fill in the pieces of layout that may need to look at data
539-
plots.supplyLayoutModuleDefaults(layout, newFullLayout, newFullData);
539+
plots.supplyLayoutModuleDefaults(newLayout, newFullLayout, newFullData);
540540

541541
// TODO remove in v2.0.0
542542
// add has-plot-type refs to fullLayout for backward compatibility

0 commit comments

Comments
 (0)