Skip to content

Commit 85ad874

Browse files
committed
add three more early returns for destroyed plot
1 parent a5f2087 commit 85ad874

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed

Diff for: src/components/legend/draw.js

+1
Original file line numberDiff line numberDiff line change
@@ -369,6 +369,7 @@ function clickOrDoubleClick(gd, legend, legendItem, numClicks, evt) {
369369

370370
if(numClicks === 1) {
371371
legend._clickTimeout = setTimeout(function() {
372+
if(!gd._fullLayout) return;
372373
handleClick(legendItem, gd, numClicks);
373374
}, gd._context.doubleClickDelay);
374375
} else if(numClicks === 2) {

Diff for: src/plots/cartesian/dragbox.js

+1
Original file line numberDiff line numberDiff line change
@@ -535,6 +535,7 @@ function makeDragBox(gd, plotinfo, x, y, w, h, ns, ew) {
535535
// then replot after a delay to make sure
536536
// no more scrolling is coming
537537
redrawTimer = setTimeout(function() {
538+
if(!gd._fullLayout) return;
538539
scrollViewBox = [0, 0, pw, ph];
539540
dragTail();
540541
}, REDRAWDELAY);

Diff for: src/plots/plots.js

+1
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ plots.redrawText = function(gd) {
5151

5252
return new Promise(function(resolve) {
5353
setTimeout(function() {
54+
if(!gd._fullLayout) return;
5455
Registry.getComponentMethod('annotations', 'draw')(gd);
5556
Registry.getComponentMethod('legend', 'draw')(gd);
5657
Registry.getComponentMethod('colorbar', 'draw')(gd);

0 commit comments

Comments
 (0)