File tree 1 file changed +16
-0
lines changed
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() {
1138
1138
} ) ;
1139
1139
1140
1140
it ( 'should rotate all non-symmetrical layers on angular drag' , function ( done ) {
1141
+ var evtCnt = 0 ;
1142
+ var evtData = { } ;
1141
1143
var dragCoverNode ;
1142
1144
var p1 ;
1143
1145
@@ -1194,6 +1196,12 @@ describe('Test polar *gridshape linear* interactions', function() {
1194
1196
height : 400 ,
1195
1197
margin : { l : 50 , t : 50 , b : 50 , r : 50 }
1196
1198
} )
1199
+ . then ( function ( ) {
1200
+ gd . on ( 'plotly_relayout' , function ( d ) {
1201
+ evtCnt ++ ;
1202
+ evtData = d ;
1203
+ } ) ;
1204
+ } )
1197
1205
. then ( function ( ) {
1198
1206
layersRotateFromZero . forEach ( function ( q ) {
1199
1207
_assertTransformRotate ( 'base' , q , null ) ;
@@ -1209,6 +1217,14 @@ describe('Test polar *gridshape linear* interactions', function() {
1209
1217
fromRadialAxis : - 82.8
1210
1218
} ) ;
1211
1219
} )
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
+ } )
1212
1228
. catch ( failTest )
1213
1229
. then ( done ) ;
1214
1230
} ) ;
You can’t perform that action at this time.
0 commit comments