Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 603b8fe

Browse files
committed
don't try to remove gl2d canvas from gl container in static plots:
- as it doesn't exist after calling scene.toImage.
1 parent 4c676df commit 603b8fe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/plots/gl2d/scene2d.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ proto.cameraChanged = function() {
293293
proto.destroy = function() {
294294
this.glplot.dispose();
295295

296-
this.container.removeChild(this.canvas);
296+
if(!this.staticPlot) this.container.removeChild(this.canvas);
297297
this.container.removeChild(this.svgContainer);
298298
this.container.removeChild(this.mouseContainer);
299299

0 commit comments

Comments
 (0)