@@ -464,7 +464,7 @@ plots.sendDataToCloud = function(gd) {
464
464
plots . supplyDefaults = function ( gd ) {
465
465
var oldFullLayout = gd . _fullLayout || { } ,
466
466
newFullLayout = gd . _fullLayout = { } ,
467
- layout = gd . layout || { } ;
467
+ newLayout = gd . layout || { } ;
468
468
469
469
var oldFullData = gd . _fullData || [ ] ,
470
470
newFullData = gd . _fullData = [ ] ,
@@ -483,20 +483,20 @@ plots.supplyDefaults = function(gd) {
483
483
var oldWidth = oldFullLayout . width ,
484
484
oldHeight = oldFullLayout . height ;
485
485
486
- plots . supplyLayoutGlobalDefaults ( layout , newFullLayout ) ;
486
+ plots . supplyLayoutGlobalDefaults ( newLayout , newFullLayout ) ;
487
487
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 ;
490
490
}
491
491
else {
492
492
// coerce the updated layout and autosize if needed
493
- plots . supplyLayoutGlobalDefaults ( layout , newFullLayout ) ;
493
+ plots . supplyLayoutGlobalDefaults ( newLayout , newFullLayout ) ;
494
494
495
- var missingWidthOrHeight = ( ! layout . width || ! layout . height ) ,
496
- autosize = layout . autosize ,
495
+ var missingWidthOrHeight = ( ! newLayout . width || ! newLayout . height ) ,
496
+ autosize = newLayout . autosize ,
497
497
autosizable = gd . _context && gd . _context . autosizable ,
498
498
initialAutoSize = missingWidthOrHeight && ( autosize || autosizable ) ;
499
- if ( initialAutoSize ) plots . plotAutoSize ( gd , layout , newFullLayout ) ;
499
+ if ( initialAutoSize ) plots . plotAutoSize ( gd , newLayout , newFullLayout ) ;
500
500
}
501
501
502
502
newFullLayout . _initialAutoSizeIsDone = true ;
@@ -536,7 +536,7 @@ plots.supplyDefaults = function(gd) {
536
536
}
537
537
538
538
// 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 ) ;
540
540
541
541
// TODO remove in v2.0.0
542
542
// add has-plot-type refs to fullLayout for backward compatibility
0 commit comments