@@ -1672,24 +1672,23 @@ describe('Test select box and lasso in general:', function() {
1672
1672
}
1673
1673
} ) . then ( function ( ) {
1674
1674
return Plotly . relayout ( gd , 'dragmode' , 'select' ) ;
1675
+ } ) . then ( function ( ) {
1676
+ return drag ( [ [ 150 , 600 ] , [ 780 , 400 ] ] ) ;
1677
+ } ) . then ( function ( ) {
1678
+ expect ( gd . data [ 0 ] . selectedpoints ) . toBe ( undefined ) ;
1679
+ expect ( gd . data [ 1 ] . selectedpoints ) . toEqual ( [ 1 , 2 ] ) ;
1680
+ expect ( gd . data [ 2 ] . selectedpoints ) . toBe ( undefined ) ;
1681
+ expect ( gd . data [ 3 ] . selectedpoints ) . toEqual ( [ 1 , 2 ] ) ;
1675
1682
} ) . then ( function ( ) {
1676
1683
return drag ( [ [ 150 , 100 ] , [ 600 , 250 ] ] ) ;
1677
1684
} ) . then ( function ( ) {
1678
1685
expect ( gd . data [ 0 ] . selectedpoints ) . toEqual ( [ 1 , 2 ] ) ;
1679
- expect ( gd . data [ 1 ] . selectedpoints ) . toBe ( undefined ) ;
1686
+ expect ( gd . data [ 1 ] . selectedpoints ) . toEqual ( [ 1 , 2 ] ) ;
1680
1687
expect ( gd . data [ 2 ] . selectedpoints ) . toEqual ( [ 1 ] ) ;
1681
- expect ( gd . data [ 3 ] . selectedpoints ) . toBe ( undefined ) ;
1688
+ expect ( gd . data [ 3 ] . selectedpoints ) . toEqual ( [ 1 , 2 ] ) ;
1682
1689
} ) . then ( function ( ) {
1683
1690
return drag ( [ [ 600 , 175 ] , [ 780 , 175 ] ] ) ; // Extend existing selection
1684
1691
} ) . then ( function ( ) {
1685
- expect ( gd . data [ 0 ] . selectedpoints ) . toEqual ( [ 1 , 2 ] ) ;
1686
- expect ( gd . data [ 1 ] . selectedpoints ) . toBe ( undefined ) ;
1687
- expect ( gd . data [ 2 ] . selectedpoints ) . toEqual ( [ 1 , 2 ] ) ;
1688
- expect ( gd . data [ 3 ] . selectedpoints ) . toBe ( undefined ) ;
1689
- } ) . then ( function ( ) {
1690
- return drag ( [ [ 150 , 600 ] , [ 780 , 400 ] ] ) ;
1691
- } ) . then ( function ( ) {
1692
- console . log ( gd . data )
1693
1692
expect ( gd . data [ 0 ] . selectedpoints ) . toEqual ( [ 1 , 2 ] ) ;
1694
1693
expect ( gd . data [ 1 ] . selectedpoints ) . toEqual ( [ 1 , 2 ] ) ;
1695
1694
expect ( gd . data [ 2 ] . selectedpoints ) . toEqual ( [ 1 , 2 ] ) ;
0 commit comments