@@ -867,6 +867,44 @@ describe('Test select box and lasso per trace:', function() {
867867 . then ( done ) ;
868868 } , LONG_TIMEOUT_INTERVAL ) ;
869869
870+ it ( 'should work on scatterpolar traces' , function ( done ) {
871+ var assertPoints = makeAssertPoints ( [ 'r' , 'theta' ] ) ;
872+ var assertSelectedPoints = makeAssertSelectedPoints ( ) ;
873+
874+ var fig = Lib . extendDeep ( { } , require ( '@mocks/polar_subplots' ) ) ;
875+ fig . layout . width = 800 ;
876+ fig . layout . dragmode = 'select' ;
877+ addInvisible ( fig ) ;
878+
879+ Plotly . plot ( gd , fig ) . then ( function ( ) {
880+ return _run (
881+ [ [ 150 , 150 ] , [ 350 , 250 ] ] ,
882+ function ( ) {
883+ assertPoints ( [ [ 1 , 0 ] , [ 2 , 45 ] ] ) ;
884+ assertSelectedPoints ( { 0 : [ 0 , 1 ] } ) ;
885+ } ,
886+ [ 200 , 200 ] ,
887+ BOXEVENTS , 'scatterpolar select'
888+ ) ;
889+ } )
890+ . then ( function ( ) {
891+ return Plotly . relayout ( gd , 'dragmode' , 'lasso' ) ;
892+ } )
893+ . then ( function ( ) {
894+ return _run (
895+ [ [ 150 , 150 ] , [ 350 , 150 ] , [ 350 , 250 ] , [ 150 , 250 ] , [ 150 , 150 ] ] ,
896+ function ( ) {
897+ assertPoints ( [ [ 1 , 0 ] , [ 2 , 45 ] ] ) ;
898+ assertSelectedPoints ( { 0 : [ 0 , 1 ] } ) ;
899+ } ,
900+ [ 200 , 200 ] ,
901+ LASSOEVENTS , 'scatterpolar lasso'
902+ ) ;
903+ } )
904+ . catch ( fail )
905+ . then ( done ) ;
906+ } ) ;
907+
870908 it ( 'should work on choropleth traces' , function ( done ) {
871909 var assertPoints = makeAssertPoints ( [ 'location' , 'z' ] ) ;
872910 var assertSelectedPoints = makeAssertSelectedPoints ( ) ;
0 commit comments