File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -1138,6 +1138,8 @@ describe('Test polar *gridshape linear* interactions', function() {
11381138 } ) ;
11391139
11401140 it ( 'should rotate all non-symmetrical layers on angular drag' , function ( done ) {
1141+ var evtCnt = 0 ;
1142+ var evtData = { } ;
11411143 var dragCoverNode ;
11421144 var p1 ;
11431145
@@ -1194,6 +1196,12 @@ describe('Test polar *gridshape linear* interactions', function() {
11941196 height : 400 ,
11951197 margin : { l : 50 , t : 50 , b : 50 , r : 50 }
11961198 } )
1199+ . then ( function ( ) {
1200+ gd . on ( 'plotly_relayout' , function ( d ) {
1201+ evtCnt ++ ;
1202+ evtData = d ;
1203+ } ) ;
1204+ } )
11971205 . then ( function ( ) {
11981206 layersRotateFromZero . forEach ( function ( q ) {
11991207 _assertTransformRotate ( 'base' , q , null ) ;
@@ -1209,6 +1217,14 @@ describe('Test polar *gridshape linear* interactions', function() {
12091217 fromRadialAxis : - 82.8
12101218 } ) ;
12111219 } )
1220+ . then ( function ( ) {
1221+ expect ( evtCnt ) . toBe ( 1 , '# of plotly_relayout calls' ) ;
1222+ expect ( evtData [ 'polar.angularaxis.rotation' ] )
1223+ . toBeCloseTo ( 82.8 , 1 , 'polar.angularaxis.rotation event data' ) ;
1224+ // have to rotate radial axis too here, to ensure it remains 'on scale'
1225+ expect ( evtData [ 'polar.radialaxis.angle' ] )
1226+ . toBeCloseTo ( 82.8 , 1 , 'polar.radialaxis.angle event data' ) ;
1227+ } )
12121228 . catch ( failTest )
12131229 . then ( done ) ;
12141230 } ) ;
You can’t perform that action at this time.
0 commit comments