Skip to content

Commit

Permalink
Plots.resize: only resolve if a new request hasn't been queued
Browse files Browse the repository at this point in the history
  • Loading branch information
antoinerg committed Dec 4, 2019
1 parent 040d6ac commit 5ee431e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/plots/plots.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,8 @@ plots.resize = function(gd) {

Registry.call('relayout', gd, {autosize: true}).then(function() {
gd.changed = oldchanged;
resolve(gd);
// Only resolve if a new call hasn't been made!
if(gd._resolveResize === resolve) resolve(gd);
});
}, 100);
});
Expand Down

0 comments on commit 5ee431e

Please sign in to comment.