File tree Expand file tree Collapse file tree 1 file changed +21
-1
lines changed Expand file tree Collapse file tree 1 file changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -23,11 +23,31 @@ var MOUSE_DELAY = 20;
2323describe ( 'Test gl plot interactions' , function ( ) {
2424 'use strict' ;
2525
26+ var gd ;
27+
2628 beforeEach ( function ( ) {
2729 jasmine . addMatchers ( customMatchers ) ;
2830 } ) ;
2931
30- afterEach ( destroyGraphDiv ) ;
32+ afterEach ( function ( ) {
33+ var fullLayout = gd . _fullLayout ,
34+ sceneIds ;
35+
36+ sceneIds = Plots . getSubplotIds ( fullLayout , 'gl3d' ) ;
37+ sceneIds . forEach ( function ( id ) {
38+ fullLayout [ id ] . _scene . destroy ( ) ;
39+ } ) ;
40+
41+ sceneIds = Plots . getSubplotIds ( fullLayout , 'gl2d' ) ;
42+ sceneIds . forEach ( function ( id ) {
43+ var scene2d = fullLayout . _plots [ id ] . _scene2d ;
44+ scene2d . stopped = true ;
45+ scene2d . destroy ( ) ;
46+ } ) ;
47+
48+ destroyGraphDiv ( ) ;
49+ } ) ;
50+
3151
3252 describe ( 'gl3d plots' , function ( ) {
3353 var mock = require ( '@mocks/gl3d_marker-arrays.json' ) ;
You can’t perform that action at this time.
0 commit comments