@@ -1851,7 +1851,7 @@ describe('Test select box and lasso per trace:', function() {
18511851 dblClickPos = dblClickPos || [ 250 , 200 ] ;
18521852
18531853 var scale = 1 ;
1854- if ( hasCssTransform ) {
1854+ if ( hasCssTransform ) {
18551855 scale = 0.5 ;
18561856 }
18571857 dblClickPos [ 0 ] *= scale ;
@@ -1894,8 +1894,12 @@ describe('Test select box and lasso per trace:', function() {
18941894 fig . layout . dragmode = 'select' ;
18951895 addInvisible ( fig ) ;
18961896
1897- if ( hasCssTransform ) transformPlot ( gd , cssTransform ) ;
1898- Plotly . plot ( gd , fig ) . then ( function ( ) {
1897+ Plotly . plot ( gd , fig )
1898+ . then ( function ( ) {
1899+ if ( hasCssTransform )
1900+ transformPlot ( gd , cssTransform ) ;
1901+ } )
1902+ . then ( function ( ) {
18991903 return _run ( hasCssTransform ,
19001904 [ [ 400 , 200 ] , [ 445 , 235 ] ] ,
19011905 function ( ) {
@@ -1950,8 +1954,12 @@ describe('Test select box and lasso per trace:', function() {
19501954 fig . layout . dragmode = 'select' ;
19511955 addInvisible ( fig ) ;
19521956
1953- if ( hasCssTransform ) transformPlot ( gd , cssTransform ) ;
1954- Plotly . plot ( gd , fig ) . then ( function ( ) {
1957+ Plotly . plot ( gd , fig )
1958+ . then ( function ( ) {
1959+ if ( hasCssTransform )
1960+ transformPlot ( gd , cssTransform ) ;
1961+ } )
1962+ . then ( function ( ) {
19551963 return _run ( hasCssTransform ,
19561964 [ [ 300 , 200 ] , [ 400 , 250 ] ] ,
19571965 function ( ) {
@@ -1997,7 +2005,7 @@ describe('Test select box and lasso per trace:', function() {
19972005 } ;
19982006 addInvisible ( fig ) ;
19992007
2000- if ( hasCssTransform ) transformPlot ( gd , cssTransform ) ;
2008+ if ( hasCssTransform ) transformPlot ( gd , cssTransform ) ;
20012009 Plotly . plot ( gd , fig ) . then ( function ( ) {
20022010 return _run ( hasCssTransform ,
20032011 [ [ 370 , 120 ] , [ 500 , 200 ] ] ,
@@ -2056,8 +2064,12 @@ describe('Test select box and lasso per trace:', function() {
20562064 } ;
20572065 addInvisible ( fig ) ;
20582066
2059- if ( hasCssTransform ) transformPlot ( gd , cssTransform ) ;
2060- Plotly . plot ( gd , fig ) . then ( function ( ) {
2067+ Plotly . plot ( gd , fig )
2068+ . then ( function ( ) {
2069+ if ( hasCssTransform )
2070+ transformPlot ( gd , cssTransform ) ;
2071+ } )
2072+ . then ( function ( ) {
20612073 return _run ( hasCssTransform ,
20622074 [ [ 150 , 150 ] , [ 300 , 300 ] ] ,
20632075 function ( ) {
@@ -2128,8 +2140,11 @@ describe('Test select box and lasso per trace:', function() {
21282140 } ;
21292141 addInvisible ( fig ) ;
21302142
2131- if ( hasCssTransform ) transformPlot ( gd , cssTransform ) ;
21322143 Plotly . plot ( gd , fig )
2144+ . then ( function ( ) {
2145+ if ( hasCssTransform )
2146+ transformPlot ( gd , cssTransform ) ;
2147+ } )
21332148 . then ( function ( ) {
21342149 return _run ( hasCssTransform ,
21352150 [ [ 350 , 200 ] , [ 450 , 400 ] ] ,
@@ -2202,8 +2217,12 @@ describe('Test select box and lasso per trace:', function() {
22022217 fig . layout . dragmode = 'select' ;
22032218 addInvisible ( fig ) ;
22042219
2205- if ( hasCssTransform ) transformPlot ( gd , cssTransform ) ;
2206- Plotly . plot ( gd , fig ) . then ( function ( ) {
2220+ Plotly . plot ( gd , fig )
2221+ . then ( function ( ) {
2222+ if ( hasCssTransform )
2223+ transformPlot ( gd , cssTransform ) ;
2224+ } )
2225+ . then ( function ( ) {
22072226 return _run ( hasCssTransform ,
22082227 [ [ 150 , 150 ] , [ 350 , 250 ] ] ,
22092228 function ( ) {
@@ -2245,8 +2264,12 @@ describe('Test select box and lasso per trace:', function() {
22452264 fig . layout . dragmode = 'select' ;
22462265 addInvisible ( fig ) ;
22472266
2248- if ( hasCssTransform ) transformPlot ( gd , cssTransform ) ;
2249- Plotly . plot ( gd , fig ) . then ( function ( ) {
2267+ Plotly . plot ( gd , fig )
2268+ . then ( function ( ) {
2269+ if ( hasCssTransform )
2270+ transformPlot ( gd , cssTransform ) ;
2271+ } )
2272+ . then ( function ( ) {
22502273 return _run ( hasCssTransform ,
22512274 [ [ 150 , 150 ] , [ 250 , 250 ] ] ,
22522275 function ( ) {
@@ -2313,8 +2336,11 @@ describe('Test select box and lasso per trace:', function() {
23132336 emptyChoroplethTrace . z = [ ] ;
23142337 fig . data . push ( emptyChoroplethTrace ) ;
23152338
2316- if ( hasCssTransform ) transformPlot ( gd , cssTransform ) ;
23172339 Plotly . plot ( gd , fig )
2340+ . then ( function ( ) {
2341+ if ( hasCssTransform )
2342+ transformPlot ( gd , cssTransform ) ;
2343+ } )
23182344 . then ( function ( ) {
23192345 return _run ( hasCssTransform ,
23202346 [ [ 350 , 200 ] , [ 400 , 250 ] ] ,
@@ -2369,8 +2395,11 @@ describe('Test select box and lasso per trace:', function() {
23692395 fig . layout . dragmode = 'lasso' ;
23702396 addInvisible ( fig ) ;
23712397
2372- if ( hasCssTransform ) transformPlot ( gd , cssTransform ) ;
23732398 Plotly . plot ( gd , fig )
2399+ . then ( function ( ) {
2400+ if ( hasCssTransform )
2401+ transformPlot ( gd , cssTransform ) ;
2402+ } )
23742403 . then ( function ( ) {
23752404 return _run ( hasCssTransform ,
23762405 [ [ 400 , 300 ] , [ 200 , 400 ] , [ 400 , 500 ] , [ 600 , 400 ] , [ 500 , 350 ] ] ,
@@ -2430,8 +2459,11 @@ describe('Test select box and lasso per trace:', function() {
24302459 fig . layout . dragmode = 'lasso' ;
24312460 addInvisible ( fig ) ;
24322461
2433- if ( hasCssTransform ) transformPlot ( gd , cssTransform ) ;
24342462 Plotly . plot ( gd , fig )
2463+ . then ( function ( ) {
2464+ if ( hasCssTransform )
2465+ transformPlot ( gd , cssTransform ) ;
2466+ } )
24352467 . then ( function ( ) {
24362468 return _run ( hasCssTransform ,
24372469 [ [ 400 , 300 ] , [ 200 , 400 ] , [ 400 , 500 ] , [ 600 , 400 ] , [ 500 , 350 ] ] ,
@@ -2493,8 +2525,11 @@ describe('Test select box and lasso per trace:', function() {
24932525 fig . layout . dragmode = 'lasso' ;
24942526 addInvisible ( fig ) ;
24952527
2496- if ( hasCssTransform ) transformPlot ( gd , cssTransform ) ;
24972528 Plotly . plot ( gd , fig )
2529+ . then ( function ( ) {
2530+ if ( hasCssTransform )
2531+ transformPlot ( gd , cssTransform ) ;
2532+ } )
24982533 . then ( function ( ) {
24992534 return _run ( hasCssTransform ,
25002535 [ [ 350 , 200 ] , [ 400 , 200 ] , [ 400 , 250 ] , [ 350 , 250 ] , [ 350 , 200 ] ] ,
@@ -2600,8 +2635,11 @@ describe('Test select box and lasso per trace:', function() {
26002635 var x1 = 250 ;
26012636 var y1 = 250 ;
26022637
2603- if ( hasCssTransform ) transformPlot ( gd , cssTransform ) ;
26042638 Plotly . plot ( gd , fig )
2639+ . then ( function ( ) {
2640+ if ( hasCssTransform )
2641+ transformPlot ( gd , cssTransform ) ;
2642+ } )
26052643 . then ( function ( ) {
26062644 return _run ( hasCssTransform ,
26072645 [ [ x0 , y0 ] , [ x1 , y0 ] , [ x1 , y1 ] , [ x0 , y1 ] , [ x0 , y0 ] ] ,
@@ -2649,8 +2687,11 @@ describe('Test select box and lasso per trace:', function() {
26492687 fig . layout . height = 500 ;
26502688 addInvisible ( fig ) ;
26512689
2652- if ( hasCssTransform ) transformPlot ( gd , cssTransform ) ;
26532690 Plotly . plot ( gd , fig )
2691+ . then ( function ( ) {
2692+ if ( hasCssTransform )
2693+ transformPlot ( gd , cssTransform ) ;
2694+ } )
26542695 . then ( function ( ) {
26552696 return _run ( hasCssTransform ,
26562697 [ [ 200 , 200 ] , [ 400 , 200 ] , [ 400 , 350 ] , [ 200 , 350 ] , [ 200 , 200 ] ] ,
@@ -2705,8 +2746,11 @@ describe('Test select box and lasso per trace:', function() {
27052746 fig . layout . xaxis = { range : [ - 0.565 , 1.5 ] } ;
27062747 addInvisible ( fig ) ;
27072748
2708- if ( hasCssTransform ) transformPlot ( gd , cssTransform ) ;
27092749 Plotly . plot ( gd , fig )
2750+ . then ( function ( ) {
2751+ if ( hasCssTransform )
2752+ transformPlot ( gd , cssTransform ) ;
2753+ } )
27102754 . then ( function ( ) {
27112755 return _run ( hasCssTransform ,
27122756 [ [ 200 , 200 ] , [ 400 , 200 ] , [ 400 , 350 ] , [ 200 , 350 ] , [ 200 , 200 ] ] ,
@@ -2778,8 +2822,11 @@ describe('Test select box and lasso per trace:', function() {
27782822 }
27792823 } ;
27802824
2781- if ( hasCssTransform ) transformPlot ( gd , cssTransform ) ;
27822825 Plotly . plot ( gd , fig )
2826+ . then ( function ( ) {
2827+ if ( hasCssTransform )
2828+ transformPlot ( gd , cssTransform ) ;
2829+ } )
27832830 . then ( function ( ) {
27842831 return _run ( hasCssTransform ,
27852832 [ [ 200 , 200 ] , [ 400 , 200 ] , [ 400 , 350 ] , [ 200 , 350 ] , [ 200 , 200 ] ] ,
@@ -2821,8 +2868,11 @@ describe('Test select box and lasso per trace:', function() {
28212868 fig . layout . height = 500 ;
28222869 addInvisible ( fig ) ;
28232870
2824- if ( hasCssTransform ) transformPlot ( gd , cssTransform ) ;
28252871 Plotly . plot ( gd , fig )
2872+ . then ( function ( ) {
2873+ if ( hasCssTransform )
2874+ transformPlot ( gd , cssTransform ) ;
2875+ } )
28262876 . then ( function ( ) {
28272877 return _run ( hasCssTransform ,
28282878 [ [ 200 , 200 ] , [ 400 , 200 ] , [ 400 , 350 ] , [ 200 , 350 ] , [ 200 , 200 ] ] ,
@@ -2903,7 +2953,6 @@ describe('Test select box and lasso per trace:', function() {
29032953 return unselected ;
29042954 }
29052955
2906- if ( hasCssTransform ) transformPlot ( gd , cssTransform ) ;
29072956 Plotly . newPlot ( gd , [ {
29082957 type : type ,
29092958 x : [ '2011-01-02' , '2011-01-03' , '2011-01-04' ] ,
@@ -2918,6 +2967,10 @@ describe('Test select box and lasso per trace:', function() {
29182967 yaxis : { range : [ - 3 , 9 ] } ,
29192968 dragmode : 'lasso'
29202969 } )
2970+ . then ( function ( ) {
2971+ if ( hasCssTransform )
2972+ transformPlot ( gd , cssTransform ) ;
2973+ } )
29212974 . then ( function ( ) {
29222975 return _run ( hasCssTransform ,
29232976 [ [ l0 , t ] , [ l0 , b ] , [ r0 , b ] , [ r0 , t ] , [ l0 , t ] ] ,
@@ -2958,7 +3011,6 @@ describe('Test select box and lasso per trace:', function() {
29583011 it ( '@flaky should work on traces with enabled transforms, hasCssTransform: ' + hasCssTransform , function ( done ) {
29593012 var assertSelectedPoints = makeAssertSelectedPoints ( ) ;
29603013
2961- if ( hasCssTransform ) transformPlot ( gd , cssTransform ) ;
29623014 Plotly . plot ( gd , [ {
29633015 x : [ 1 , 2 , 3 , 4 , 5 ] ,
29643016 y : [ 2 , 3 , 1 , 7 , 9 ] ,
@@ -2985,6 +3037,10 @@ describe('Test select box and lasso per trace:', function() {
29853037 height : 400 ,
29863038 margin : { l : 0 , t : 0 , r : 0 , b : 0 }
29873039 } )
3040+ . then ( function ( ) {
3041+ if ( hasCssTransform )
3042+ transformPlot ( gd , cssTransform ) ;
3043+ } )
29883044 . then ( function ( ) {
29893045 return _run ( hasCssTransform ,
29903046 [ [ 5 , 5 ] , [ 395 , 395 ] ] ,
@@ -3015,7 +3071,6 @@ describe('Test select box and lasso per trace:', function() {
30153071 } ) ;
30163072 }
30173073
3018- if ( hasCssTransform ) transformPlot ( gd , cssTransform ) ;
30193074 Plotly . plot ( gd , [ {
30203075 mode : 'markers+text' ,
30213076 x : [ 1 , 2 , 3 ] ,
@@ -3035,6 +3090,10 @@ describe('Test select box and lasso per trace:', function() {
30353090 height : 400 ,
30363091 margin : { l : 0 , t : 0 , r : 0 , b : 0 }
30373092 } )
3093+ . then ( function ( ) {
3094+ if ( hasCssTransform )
3095+ transformPlot ( gd , cssTransform ) ;
3096+ } )
30383097 . then ( function ( ) {
30393098 return _run ( hasCssTransform ,
30403099 [ [ 10 , 10 ] , [ 100 , 300 ] ] ,
@@ -3062,8 +3121,11 @@ describe('Test select box and lasso per trace:', function() {
30623121 fig . layout . dragmode = 'select' ;
30633122 var dblClickPos = [ 250 , 400 ] ;
30643123
3065- if ( hasCssTransform ) transformPlot ( gd , cssTransform ) ;
30663124 Plotly . plot ( gd , fig )
3125+ . then ( function ( ) {
3126+ if ( hasCssTransform )
3127+ transformPlot ( gd , cssTransform ) ;
3128+ } )
30673129 . then ( function ( ) {
30683130 // No groups initially
30693131 expect ( gd . _fullData [ 0 ] . node . groups ) . toEqual ( [ ] ) ;
0 commit comments