File tree 1 file changed +23
-0
lines changed
1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -1341,6 +1341,29 @@ describe('Test geo interactions', function() {
1341
1341
. catch ( fail )
1342
1342
. then ( done ) ;
1343
1343
} ) ;
1344
+
1345
+ it ( 'relayout bounds edge case' , function ( done ) {
1346
+ var gd = createGraphDiv ( ) ;
1347
+ var fig = Lib . extendDeep ( { } , require ( '@mocks/geo_orthographic.json' ) ) ;
1348
+
1349
+ Plotly . plot ( gd , fig ) . then ( function ( ) {
1350
+ expect ( gd . _fullLayout . geo . _subplot . bounds ) . toBeCloseTo2DArray ( [
1351
+ [ 84 , 100 ] , [ 404 , 420 ]
1352
+ ] ) ;
1353
+
1354
+ return Plotly . relayout ( gd , {
1355
+ 'geo.projection.rotation.lon' : - 73 ,
1356
+ 'geo.projection.rotation.lat' : 42
1357
+ } ) ;
1358
+ } )
1359
+ . then ( function ( ) {
1360
+ expect ( gd . _fullLayout . geo . _subplot . bounds ) . toBeCloseTo2DArray ( [
1361
+ [ 84 , 100 ] , [ 404 , 420 ]
1362
+ ] ) ;
1363
+ } )
1364
+ . catch ( fail )
1365
+ . then ( done ) ;
1366
+ } ) ;
1344
1367
} ) ;
1345
1368
1346
1369
describe ( 'Test event property of interactions on a geo plot:' , function ( ) {
You can’t perform that action at this time.
0 commit comments