Skip to content

Commit 177e6f0

Browse files
committed
use _replotting in cartesian dragbox
1 parent b2a4b76 commit 177e6f0

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/plots/cartesian/dragbox.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -516,6 +516,9 @@ function makeDragBox(gd, plotinfo, x, y, w, h, ns, ew) {
516516
return;
517517
}
518518

519+
// prevent axis drawing from monkeying with margins until we're done
520+
gd._fullLayout._replotting = true;
521+
519522
if(xActive === 'ew' || yActive === 'ns') {
520523
if(xActive) dragAxList(xaxes, dx);
521524
if(yActive) dragAxList(yaxes, dy);
@@ -726,7 +729,10 @@ function makeDragBox(gd, plotinfo, x, y, w, h, ns, ew) {
726729
// accumulated MathJax promises - wait for them before we relayout.
727730
Lib.syncOrAsync([
728731
Plots.previousPromises,
729-
function() { Registry.call('_guiRelayout', gd, updates); }
732+
function() {
733+
gd._fullLayout._replotting = false;
734+
Registry.call('_guiRelayout', gd, updates);
735+
}
730736
], gd);
731737
}
732738

0 commit comments

Comments
 (0)