File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -318,6 +318,14 @@ proto.destroy = function() {
318318
319319 this . glplot = null ;
320320 this . stopped = true ;
321+
322+ var traces = this . traces
323+ if ( traces ) {
324+ Object . keys ( traces ) . map ( function ( key ) {
325+ traces [ key ] . dispose ( ) ;
326+ traces [ key ] = null ;
327+ } )
328+ }
321329} ;
322330
323331proto . plot = function ( fullData , calcData , fullLayout ) {
Original file line number Diff line number Diff line change @@ -809,6 +809,16 @@ plots.purge = function(gd) {
809809 // remove modebar
810810 if ( fullLayout . _modeBar ) fullLayout . _modeBar . destroy ( ) ;
811811
812+ if ( fullLayout . _plots ) {
813+ Object . keys ( fullLayout . _plots ) . map ( function ( key ) {
814+ var plot = fullLayout . _plots [ key ] ;
815+ if ( plot . _scene2d ) {
816+ plot . _scene2d . destroy ( ) ;
817+ plot . _scene2d = null ;
818+ }
819+ } ) ;
820+ }
821+
812822 // data and layout
813823 delete gd . data ;
814824 delete gd . layout ;
You can’t perform that action at this time.
0 commit comments