@@ -58,14 +58,6 @@ function mostOfDrag(x1, y1, x2, y2) {
58
58
mouseEvent ( 'mousemove' , x2 , y2 ) ;
59
59
}
60
60
61
- function purgeGraphDiv ( done ) {
62
- var gd = d3Select ( '.js-plotly-plot' ) . node ( ) ;
63
- if ( gd ) Plotly . purge ( gd ) ;
64
- destroyGraphDiv ( ) ;
65
-
66
- return delay ( 50 ) ( ) . then ( done ) ;
67
- }
68
-
69
61
function getAvgPixelByChannel ( id ) {
70
62
var canvas = d3Select ( id ) . node ( ) ;
71
63
@@ -376,7 +368,7 @@ describe('parcoords edge cases', function() {
376
368
gd = createGraphDiv ( ) ;
377
369
} ) ;
378
370
379
- afterEach ( purgeGraphDiv ) ;
371
+ afterEach ( destroyGraphDiv ) ;
380
372
381
373
it ( '@gl Works fine with one panel only' , function ( done ) {
382
374
var mockCopy = Lib . extendDeep ( { } , mock2 ) ;
@@ -645,7 +637,7 @@ describe('parcoords edge cases', function() {
645
637
describe ( 'parcoords Lifecycle methods' , function ( ) {
646
638
var gd ;
647
639
beforeEach ( function ( ) { gd = createGraphDiv ( ) ; } ) ;
648
- afterEach ( purgeGraphDiv ) ;
640
+ afterEach ( destroyGraphDiv ) ;
649
641
650
642
it ( 'Plotly.deleteTraces with one trace removes the plot' , function ( done ) {
651
643
var mockCopy = Lib . extendDeep ( { } , mock ) ;
@@ -915,7 +907,7 @@ describe('parcoords basic use', function() {
915
907
gd = createGraphDiv ( ) ;
916
908
} ) ;
917
909
918
- afterEach ( purgeGraphDiv ) ;
910
+ afterEach ( destroyGraphDiv ) ;
919
911
920
912
it ( '@gl should create three WebGL contexts per graph' , function ( done ) {
921
913
Plotly . react ( gd , mockCopy )
@@ -1223,7 +1215,7 @@ describe('parcoords react more attributes', function() {
1223
1215
gd = createGraphDiv ( ) ;
1224
1216
} ) ;
1225
1217
1226
- afterEach ( purgeGraphDiv ) ;
1218
+ afterEach ( destroyGraphDiv ) ;
1227
1219
1228
1220
it ( '@gl should change various axis parameters' , function ( done ) {
1229
1221
Plotly . react ( gd , mock3 )
@@ -1372,15 +1364,15 @@ describe('parcoords constraint interactions - without defined axis ranges', func
1372
1364
} ) ;
1373
1365
1374
1366
afterAll ( function ( ) {
1375
- purgeGraphDiv ( ) ;
1367
+ destroyGraphDiv ( ) ;
1376
1368
PC . bar . snapDuration = initialSnapDuration ;
1377
1369
} ) ;
1378
1370
1379
1371
beforeEach ( function ( ) {
1380
1372
gd = createGraphDiv ( ) ;
1381
1373
} ) ;
1382
1374
1383
- afterEach ( purgeGraphDiv ) ;
1375
+ afterEach ( destroyGraphDiv ) ;
1384
1376
1385
1377
function getDashArray ( index ) {
1386
1378
var highlight = document . querySelectorAll ( '.highlight' ) [ index ] ;
@@ -1658,15 +1650,15 @@ describe('parcoords constraint interactions - with defined axis ranges', functio
1658
1650
} ) ;
1659
1651
1660
1652
afterAll ( function ( ) {
1661
- purgeGraphDiv ( ) ;
1653
+ destroyGraphDiv ( ) ;
1662
1654
PC . bar . snapDuration = initialSnapDuration ;
1663
1655
} ) ;
1664
1656
1665
1657
beforeEach ( function ( ) {
1666
1658
gd = createGraphDiv ( ) ;
1667
1659
} ) ;
1668
1660
1669
- afterEach ( purgeGraphDiv ) ;
1661
+ afterEach ( destroyGraphDiv ) ;
1670
1662
1671
1663
it ( '@gl updates constraints above and below axis ranges' , function ( done ) {
1672
1664
var x = 295 ;
@@ -1740,15 +1732,15 @@ describe('parcoords constraint click interactions - with pre-defined constraint
1740
1732
} ) ;
1741
1733
1742
1734
afterAll ( function ( ) {
1743
- purgeGraphDiv ( ) ;
1735
+ destroyGraphDiv ( ) ;
1744
1736
PC . bar . snapDuration = initialSnapDuration ;
1745
1737
} ) ;
1746
1738
1747
1739
beforeEach ( function ( ) {
1748
1740
gd = createGraphDiv ( ) ;
1749
1741
} ) ;
1750
1742
1751
- afterEach ( purgeGraphDiv ) ;
1743
+ afterEach ( destroyGraphDiv ) ;
1752
1744
1753
1745
it ( '@gl should not drop constraintrange on click' , function ( done ) {
1754
1746
Plotly . react ( gd , initialFigure ( ) )
0 commit comments