@@ -1150,8 +1150,6 @@ describe('Test polar interactions:', function() {
1150
1150
it ( 'should not respond to drag interactions on plot area when dragmode === false' , function ( done ) {
1151
1151
var fig = Lib . extendDeep ( { } , require ( '@mocks/polar_scatter.json' ) ) ;
1152
1152
1153
- fig . layout . dragmode = false ;
1154
-
1155
1153
// to avoid dragging on hover labels
1156
1154
fig . layout . hovermode = false ;
1157
1155
@@ -1188,6 +1186,7 @@ describe('Test polar interactions:', function() {
1188
1186
1189
1187
_plot ( fig )
1190
1188
. then ( _assertBase )
1189
+ . then ( function ( ) { return Plotly . relayout ( gd , 'dragmode' , false ) ; } )
1191
1190
. then ( function ( ) { return _drag ( mid , [ 50 , 50 ] ) ; } )
1192
1191
. then ( function ( ) {
1193
1192
_assertBase ( 'from center move toward bottom-right' ) ;
@@ -1228,7 +1227,7 @@ describe('Test polar interactions:', function() {
1228
1227
. then ( function ( ) { _assertBase ( 'from right edge to not far enough' ) ; } )
1229
1228
. then ( function ( ) {
1230
1229
expect ( eventCnts . plotly_relayout )
1231
- . toBe ( 0 , 'no new relayout events after *not far enough* cases' ) ;
1230
+ . toBe ( 1 , 'no new relayout events after *not far enough* cases' ) ;
1232
1231
} )
1233
1232
. then ( delay ( 20 ) )
1234
1233
. then ( function ( ) { return _doubleClick ( mid ) ; } )
@@ -1245,8 +1244,6 @@ describe('Test polar interactions:', function() {
1245
1244
it ( 'should not respond to drag interactions on radial drag area when dragmode === false' , function ( done ) {
1246
1245
var fig = Lib . extendDeep ( { } , require ( '@mocks/polar_scatter.json' ) ) ;
1247
1246
1248
- fig . layout . dragmode = false ;
1249
-
1250
1247
// to avoid dragging on hover labels
1251
1248
fig . layout . hovermode = false ;
1252
1249
@@ -1301,6 +1298,7 @@ describe('Test polar interactions:', function() {
1301
1298
1302
1299
_plot ( fig )
1303
1300
. then ( _assertBase )
1301
+ . then ( function ( ) { return Plotly . relayout ( gd , 'dragmode' , false ) ; } )
1304
1302
. then ( function ( ) { return _drag ( dragPos0 , [ - 50 , 0 ] ) ; } )
1305
1303
. then ( function ( ) {
1306
1304
_assertBase ( 'move inward' ) ;
@@ -1322,14 +1320,13 @@ describe('Test polar interactions:', function() {
1322
1320
} )
1323
1321
. then ( _reset )
1324
1322
. then ( function ( ) {
1325
- expect ( eventCnts . plotly_relayout ) . toBe ( 0 , 'total # of relayout events' ) ;
1323
+ expect ( eventCnts . plotly_relayout ) . toBe ( 1 , 'total # of relayout events' ) ;
1326
1324
} )
1327
1325
. then ( done , done . fail ) ;
1328
1326
} ) ;
1329
1327
1330
1328
it ( 'should not respond to drag interactions on inner radial drag area when dragmode === false' , function ( done ) {
1331
1329
var fig = Lib . extendDeep ( { } , require ( '@mocks/polar_scatter.json' ) ) ;
1332
- fig . layout . dragmode = false ;
1333
1330
fig . layout . polar . hole = 0.2 ;
1334
1331
// to avoid dragging on hover labels
1335
1332
fig . layout . hovermode = false ;
@@ -1359,6 +1356,8 @@ describe('Test polar interactions:', function() {
1359
1356
}
1360
1357
1361
1358
_plot ( fig )
1359
+ . then ( _assertBase )
1360
+ . then ( function ( ) { return Plotly . relayout ( gd , 'dragmode' , false ) ; } )
1362
1361
. then ( function ( ) { return _drag ( dragPos0 , [ - 50 , 0 ] ) ; } )
1363
1362
. then ( function ( ) {
1364
1363
_assertBase ( 'move inward' ) ;
@@ -1374,8 +1373,6 @@ describe('Test polar interactions:', function() {
1374
1373
it ( 'should not respond to drag interactions on angular drag area when dragmode === false' , function ( done ) {
1375
1374
var fig = Lib . extendDeep ( { } , require ( '@mocks/polar_scatter.json' ) ) ;
1376
1375
1377
- fig . layout . dragmode = false ;
1378
-
1379
1376
// to avoid dragging on hover labels
1380
1377
fig . layout . hovermode = false ;
1381
1378
@@ -1421,6 +1418,7 @@ describe('Test polar interactions:', function() {
1421
1418
1422
1419
_plot ( fig )
1423
1420
. then ( _assertBase )
1421
+ . then ( function ( ) { return Plotly . relayout ( gd , 'dragmode' , false ) ; } )
1424
1422
. then ( function ( ) { return _drag ( dragPos0 , [ - 20 , - 20 ] ) ; } )
1425
1423
. then ( function ( ) {
1426
1424
_assertBase ( 'move counterclockwise' ) ;
@@ -1432,7 +1430,7 @@ describe('Test polar interactions:', function() {
1432
1430
} )
1433
1431
. then ( _reset )
1434
1432
. then ( function ( ) {
1435
- expect ( eventCnts . plotly_relayout ) . toBe ( 0 , 'total # of relayout events' ) ;
1433
+ expect ( eventCnts . plotly_relayout ) . toBe ( 1 , 'total # of relayout events' ) ;
1436
1434
} )
1437
1435
. then ( done , done . fail ) ;
1438
1436
} ) ;
0 commit comments