@@ -607,9 +607,9 @@ describe('Test Geo layout defaults', function () {
607607 } ;
608608 supplyLayoutDefaults ( layoutIn , layoutOut , fullData ) ;
609609 _assert ( {
610- 'projection.scale' : 1 ,
611- 'center.lon' : 15 ,
612- 'center.lat' : 57.5 ,
610+ 'projection.scale' : null ,
611+ 'center.lon' : null ,
612+ 'center.lat' : null ,
613613 'projection.rotation.lon' : 15 ,
614614 'projection.rotation.lat' : 0 ,
615615 'lonaxis.range' : [ - 30 , 60 ] ,
@@ -2514,7 +2514,7 @@ describe('Test geo zoom/pan/drag interactions:', function () {
25142514
25152515 newPlot ( fig )
25162516 . then ( function ( ) {
2517- _assert ( 'base' , [ [ 180 , 0 ] , [ 180 , 0 ] , 1.1249 ] , [ [ - 180 , - 0 ] , [ 350 , 260 ] , [ 0 , 0 ] , 114.59 ] , undefined ) ;
2517+ _assert ( 'base' , [ [ null , 0 ] , [ null , null ] , null ] , [ [ - 180 , - 0 ] , [ 350 , 260 ] , [ 0 , 0 ] , 114.59 ] , undefined ) ;
25182518 return drag ( {
25192519 path : [
25202520 [ 350 , 250 ] ,
@@ -2528,7 +2528,13 @@ describe('Test geo zoom/pan/drag interactions:', function () {
25282528 'after east-west drag' ,
25292529 [ [ 149.4 , 0 ] , [ 149.4 , 0 ] , 1.1249 ] ,
25302530 [ [ - 149.4 , 0 ] , [ 350 , 260 ] , [ 0 , 0 ] , 114.59 ] ,
2531- [ 'geo.projection.rotation.lon' , 'geo.center.lon' , 'geo.fitbounds' ]
2531+ [
2532+ 'geo.projection.rotation.lon' ,
2533+ 'geo.center.lon' ,
2534+ 'geo.center.lat' ,
2535+ 'geo.projection.scale' ,
2536+ 'geo.fitbounds'
2537+ ]
25322538 ) ;
25332539 return scroll ( [ 200 , 250 ] , [ - 200 , - 200 ] ) ;
25342540 } )
@@ -2558,7 +2564,7 @@ describe('Test geo zoom/pan/drag interactions:', function () {
25582564 . then ( function ( ) {
25592565 _assert (
25602566 'after double click' ,
2561- [ [ 180 , 0 ] , [ 180 , 0 ] , 1.1249 ] ,
2567+ [ [ null , 0 ] , [ null , null ] , null ] ,
25622568 [ [ - 180 , - 0 ] , [ 350 , 260 ] , [ 0 , 0 ] , 114.59 ] ,
25632569 'dblclick'
25642570 ) ;
@@ -2615,12 +2621,7 @@ describe('Test geo zoom/pan/drag interactions:', function () {
26152621 'after east-west drag' ,
26162622 [ [ - 103.7 , 49.3 ] , 1 ] ,
26172623 [ [ 103.7 , - 49.3 ] , 160 ] ,
2618- [
2619- 'geo.projection.rotation.lon' ,
2620- 'geo.projection.rotation.lat' ,
2621- 'geo.center.lon' ,
2622- 'geo.center.lat'
2623- ]
2624+ [ 'geo.projection.rotation.lon' , 'geo.projection.rotation.lat' ]
26242625 ) ;
26252626 return drag ( {
26262627 path : [
@@ -2635,12 +2636,7 @@ describe('Test geo zoom/pan/drag interactions:', function () {
26352636 'after NW-SE drag' ,
26362637 [ [ - 135.5 , 73.8 ] , 1 ] ,
26372638 [ [ 135.5 , - 73.8 ] , 160 ] ,
2638- [
2639- 'geo.projection.rotation.lon' ,
2640- 'geo.projection.rotation.lat' ,
2641- 'geo.center.lon' ,
2642- 'geo.center.lat'
2643- ]
2639+ [ 'geo.projection.rotation.lon' , 'geo.projection.rotation.lat' ]
26442640 ) ;
26452641 return scroll ( [ 300 , 300 ] , [ - 200 , - 200 ] ) ;
26462642 } )
@@ -2649,13 +2645,7 @@ describe('Test geo zoom/pan/drag interactions:', function () {
26492645 'after scroll' ,
26502646 [ [ - 126.2 , 67.1 ] , 1.3 ] ,
26512647 [ [ 126.2 , - 67.1 ] , 211.1 ] ,
2652- [
2653- 'geo.projection.rotation.lon' ,
2654- 'geo.projection.rotation.lat' ,
2655- 'geo.center.lon' ,
2656- 'geo.center.lat' ,
2657- 'geo.projection.scale'
2658- ]
2648+ [ 'geo.projection.rotation.lon' , 'geo.projection.rotation.lat' , 'geo.projection.scale' ]
26592649 ) ;
26602650 return Plotly . relayout ( gd , 'geo.showocean' , false ) ;
26612651 } )
@@ -2682,7 +2672,7 @@ describe('Test geo zoom/pan/drag interactions:', function () {
26822672
26832673 newPlot ( fig )
26842674 . then ( function ( ) {
2685- _assert ( 'base' , [ [ 76.014 , 19.735 ] , 1 ] , [ [ - 76.014 , - 19.735 ] , 160 ] , undefined ) ;
2675+ _assert ( 'base' , [ [ null , null ] , null ] , [ [ - 76.014 , - 19.735 ] , 160 ] , undefined ) ;
26862676 return drag ( {
26872677 path : [
26882678 [ 250 , 250 ] ,
@@ -2699,8 +2689,7 @@ describe('Test geo zoom/pan/drag interactions:', function () {
26992689 [
27002690 'geo.projection.rotation.lon' ,
27012691 'geo.projection.rotation.lat' ,
2702- 'geo.center.lon' ,
2703- 'geo.center.lat' ,
2692+ 'geo.projection.scale' ,
27042693 'geo.fitbounds'
27052694 ]
27062695 ) ;
@@ -2711,13 +2700,7 @@ describe('Test geo zoom/pan/drag interactions:', function () {
27112700 'after scroll' ,
27122701 [ [ 58.694 , 18.759 ] , 1.1488 ] ,
27132702 [ [ - 58.694 , - 18.759 ] , 183.818 ] ,
2714- [
2715- 'geo.projection.rotation.lon' ,
2716- 'geo.projection.rotation.lat' ,
2717- 'geo.center.lon' ,
2718- 'geo.center.lat' ,
2719- 'geo.projection.scale'
2720- ]
2703+ [ 'geo.projection.rotation.lon' , 'geo.projection.rotation.lat' , 'geo.projection.scale' ]
27212704 ) ;
27222705 return Plotly . relayout ( gd , 'geo.showocean' , false ) ;
27232706 } )
@@ -2731,8 +2714,7 @@ describe('Test geo zoom/pan/drag interactions:', function () {
27312714 return dblClick ( [ 350 , 250 ] ) ;
27322715 } )
27332716 . then ( function ( ) {
2734- // resets to initial view (viewInitial captured the fit values)
2735- _assert ( 'after double click' , [ [ 76.014 , 19.735 ] , 1 ] , [ [ - 76.014 , - 19.8 ] , 160 ] , 'dblclick' ) ;
2717+ _assert ( 'after double click' , [ [ null , null ] , null ] , [ [ - 76.014 , - 19.8 ] , 160 ] , 'dblclick' ) ;
27362718 } )
27372719 . then ( done , done . fail ) ;
27382720 } ) ;
@@ -2834,7 +2816,7 @@ describe('Test geo zoom/pan/drag interactions:', function () {
28342816
28352817 newPlot ( fig )
28362818 . then ( function ( ) {
2837- _assert ( 'base' , [ [ 20.87 , 49.33 ] , 1.7303 ] , [ [ 247 , 260 ] , [ 5.7998 , 49.29 ] , 504.8559 ] , undefined ) ;
2819+ _assert ( 'base' , [ [ null , null ] , null ] , [ [ 247 , 260 ] , [ 5.7998 , 49.29 ] , 504.8559 ] , undefined ) ;
28382820 return drag ( {
28392821 path : [
28402822 [ 250 , 250 ] ,
@@ -2848,7 +2830,7 @@ describe('Test geo zoom/pan/drag interactions:', function () {
28482830 'after SW-NE drag' ,
28492831 [ [ 29.059 , 42.38 ] , 1.727 ] ,
28502832 [ [ 197 , 210 ] , [ 5.7988 , 49.29 ] , 504.8559 ] ,
2851- [ 'geo.center.lon' , 'geo.center.lat' , 'geo.fitbounds' ]
2833+ [ 'geo.center.lon' , 'geo.center.lat' , 'geo.projection.scale' , 'geo. fitbounds']
28522834 ) ;
28532835 return scroll ( [ 300 , 300 ] , [ - 200 , - 200 ] ) ;
28542836 } )
@@ -2878,7 +2860,7 @@ describe('Test geo zoom/pan/drag interactions:', function () {
28782860 . then ( function ( ) {
28792861 _assert (
28802862 'after double click' ,
2881- [ [ 20.87 , 49.33 ] , 1.7303 ] ,
2863+ [ [ null , null ] , null ] ,
28822864 [ [ 247 , 260 ] , [ 5.7998 , 49.29 ] , 504.8559 ] ,
28832865 'dblclick'
28842866 ) ;
0 commit comments