Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions src/plots/plots.js
Original file line number Diff line number Diff line change
Expand Up @@ -293,17 +293,16 @@ plots.resize = function(gd) {
return;
}

delete gd._fullLayout._initialAutoSizeIsDone;
if(!gd.layout.width) delete (gd._fullLayout || {}).width;
if(!gd.layout.height) delete (gd._fullLayout || {}).height;
delete gd.layout.width;
delete gd.layout.height;

// autosizing doesn't count as a change that needs saving
var oldchanged = gd.changed;

// nor should it be included in the undo queue
gd.autoplay = true;

Plotly.plot(gd).then(function() {
Plotly.relayout(gd, { autosize: true }).then(function() {
gd.changed = oldchanged;
resolve(gd);
});
Expand Down