Skip to content

Commit 8f6fe07

Browse files
Merge branch 'master' into removeFileLinkWhenFileDeleted
2 parents d76a56b + d671053 commit 8f6fe07

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

shelly/plotlyjs/static/plotlyjs/src/graph_obj.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1923,6 +1923,13 @@ plots.purge = function(gd) {
19231923
// note: we DO NOT remove _context because it doesn't change when we insert
19241924
// a new plot, and may have been set outside of our scope.
19251925

1926+
// clean up the gl and geo containers
1927+
// TODO unify subplot creation/update with d3.selection.order
1928+
// and/or subplot ids
1929+
var fullLayout = gd._fullLayout || {};
1930+
if(fullLayout._glcontainer !== undefined) fullLayout._glcontainer.remove();
1931+
if(fullLayout._geocontainer !== undefined) fullLayout._geocontainer.remove();
1932+
19261933
// data and layout
19271934
delete gd.data;
19281935
delete gd.layout;
@@ -1934,6 +1941,7 @@ plots.purge = function(gd) {
19341941

19351942
delete gd.fid;
19361943

1944+
19371945
delete gd.undoqueue; // action queue
19381946
delete gd.undonum;
19391947
delete gd.autoplay; // are we doing an action that doesn't go in undo queue?

0 commit comments

Comments
 (0)