@@ -1282,6 +1282,62 @@ describe('Test select box and lasso per trace:', function() {
1282
1282
. then ( done ) ;
1283
1283
} ) ;
1284
1284
1285
+ it ( '@flaky should work on barpolar traces' , function ( done ) {
1286
+ var assertPoints = makeAssertPoints ( [ 'r' , 'theta' ] ) ;
1287
+ var assertSelectedPoints = makeAssertSelectedPoints ( ) ;
1288
+
1289
+ var fig = Lib . extendDeep ( { } , require ( '@mocks/polar_wind-rose.json' ) ) ;
1290
+ fig . layout . showlegend = false ;
1291
+ fig . layout . width = 500 ;
1292
+ fig . layout . height = 500 ;
1293
+ fig . layout . dragmode = 'select' ;
1294
+ addInvisible ( fig ) ;
1295
+
1296
+ Plotly . plot ( gd , fig ) . then ( function ( ) {
1297
+ return _run (
1298
+ [ [ 150 , 150 ] , [ 250 , 250 ] ] ,
1299
+ function ( ) {
1300
+ assertPoints ( [
1301
+ [ 62.5 , 'N-W' ] , [ 55 , 'N-W' ] , [ 40 , 'North' ] ,
1302
+ [ 40 , 'N-W' ] , [ 20 , 'North' ] , [ 22.5 , 'N-W' ]
1303
+ ] ) ;
1304
+ assertSelectedPoints ( {
1305
+ 0 : [ 7 ] ,
1306
+ 1 : [ 7 ] ,
1307
+ 2 : [ 0 , 7 ] ,
1308
+ 3 : [ 0 , 7 ]
1309
+ } ) ;
1310
+ } ,
1311
+ [ 200 , 200 ] ,
1312
+ BOXEVENTS , 'barpolar select'
1313
+ ) ;
1314
+ } )
1315
+ . then ( function ( ) {
1316
+ return Plotly . relayout ( gd , 'dragmode' , 'lasso' ) ;
1317
+ } )
1318
+ . then ( function ( ) {
1319
+ return _run (
1320
+ [ [ 150 , 150 ] , [ 350 , 150 ] , [ 350 , 250 ] , [ 150 , 250 ] , [ 150 , 150 ] ] ,
1321
+ function ( ) {
1322
+ assertPoints ( [
1323
+ [ 62.5 , 'N-W' ] , [ 50 , 'N-E' ] , [ 55 , 'N-W' ] , [ 40 , 'North' ] ,
1324
+ [ 30 , 'N-E' ] , [ 40 , 'N-W' ] , [ 20 , 'North' ] , [ 7.5 , 'N-E' ] , [ 22.5 , 'N-W' ]
1325
+ ] ) ;
1326
+ assertSelectedPoints ( {
1327
+ 0 : [ 7 ] ,
1328
+ 1 : [ 1 , 7 ] ,
1329
+ 2 : [ 0 , 1 , 7 ] ,
1330
+ 3 : [ 0 , 1 , 7 ]
1331
+ } ) ;
1332
+ } ,
1333
+ [ 200 , 200 ] ,
1334
+ LASSOEVENTS , 'barpolar lasso'
1335
+ ) ;
1336
+ } )
1337
+ . catch ( failTest )
1338
+ . then ( done ) ;
1339
+ } ) ;
1340
+
1285
1341
it ( '@flaky should work on choropleth traces' , function ( done ) {
1286
1342
var assertPoints = makeAssertPoints ( [ 'location' , 'z' ] ) ;
1287
1343
var assertSelectedPoints = makeAssertSelectedPoints ( ) ;
0 commit comments