1- var Plotly = require ( '@src/plotly ' ) ;
1+ var Geo = require ( '@src/plots/geo ' ) ;
22
3- describe ( 'Test geolayout ' , function ( ) {
3+ describe ( 'Test Geo layout defaults ' , function ( ) {
44 'use strict' ;
55
6- var GeoLayout = Plotly . GeoLayout ;
6+ var layoutAttributes = Geo . layoutAttributes ;
7+ var supplyLayoutDefaults = Geo . supplyLayoutDefaults ;
78
89 describe ( 'supplyLayoutDefaults' , function ( ) {
910 var layoutIn , layoutOut ;
@@ -30,12 +31,12 @@ describe('Test geolayout', function () {
3031 }
3132 } ;
3233
33- GeoLayout . supplyLayoutDefaults ( layoutIn , layoutOut , fullData ) ;
34+ supplyLayoutDefaults ( layoutIn , layoutOut , fullData ) ;
3435 expect ( layoutOut . geo . projection . rotation ) . toBeUndefined ( ) ;
3536
3637 delete layoutIn . geo . projection . type ;
3738 layoutOut = { } ;
38- GeoLayout . supplyLayoutDefaults ( layoutIn , layoutOut , fullData ) ;
39+ supplyLayoutDefaults ( layoutIn , layoutOut , fullData ) ;
3940 expect ( layoutOut . geo . projection . rotation ) . toBeDefined ( ) ;
4041 } ) ;
4142
@@ -55,21 +56,21 @@ describe('Test geolayout', function () {
5556 }
5657 } ;
5758
58- GeoLayout . supplyLayoutDefaults ( layoutIn , layoutOut , fullData ) ;
59+ supplyLayoutDefaults ( layoutIn , layoutOut , fullData ) ;
5960 fields . forEach ( function ( field ) {
6061 expect ( layoutOut . geo [ field ] ) . toBeUndefined ( ) ;
6162 } ) ;
6263
6364 delete layoutIn . geo . projection . type ;
6465 layoutOut = { } ;
65- GeoLayout . supplyLayoutDefaults ( layoutIn , layoutOut , fullData ) ;
66+ supplyLayoutDefaults ( layoutIn , layoutOut , fullData ) ;
6667 fields . forEach ( function ( field ) {
6768 expect ( layoutOut . geo [ field ] ) . toBeDefined ( ) ;
6869 } ) ;
6970 } ) ;
7071
7172 it ( 'should not coerce projection.parallels if type is conic' , function ( ) {
72- var projTypes = GeoLayout . layoutAttributes . projection . type . values ;
73+ var projTypes = layoutAttributes . projection . type . values ;
7374
7475 function testOne ( projType ) {
7576 layoutIn = {
@@ -81,7 +82,7 @@ describe('Test geolayout', function () {
8182 }
8283 } ;
8384 layoutOut = { } ;
84- GeoLayout . supplyLayoutDefaults ( layoutIn , layoutOut , fullData ) ;
85+ supplyLayoutDefaults ( layoutIn , layoutOut , fullData ) ;
8586 }
8687
8788 projTypes . forEach ( function ( projType ) {
@@ -103,14 +104,14 @@ describe('Test geolayout', function () {
103104 geo : { scope : 'usa' }
104105 } ;
105106 layoutOut = { } ;
106- GeoLayout . supplyLayoutDefaults ( layoutIn , layoutOut , fullData ) ;
107+ supplyLayoutDefaults ( layoutIn , layoutOut , fullData ) ;
107108 fields . forEach ( function ( field ) {
108109 expect ( layoutOut . geo [ field ] ) . toBeDefined ( ) ;
109110 } ) ;
110111
111112 delete layoutIn . geo . scope ;
112113 layoutOut = { } ;
113- GeoLayout . supplyLayoutDefaults ( layoutIn , layoutOut , fullData ) ;
114+ supplyLayoutDefaults ( layoutIn , layoutOut , fullData ) ;
114115 fields . forEach ( function ( field ) {
115116 expect ( layoutOut . geo [ field ] ) . toBeUndefined ( ) ;
116117 } ) ;
@@ -122,7 +123,7 @@ describe('Test geolayout', function () {
122123 }
123124 } ;
124125 layoutOut = { } ;
125- GeoLayout . supplyLayoutDefaults ( layoutIn , layoutOut , fullData ) ;
126+ supplyLayoutDefaults ( layoutIn , layoutOut , fullData ) ;
126127 fields . forEach ( function ( field ) {
127128 expect ( layoutOut . geo [ field ] ) . toBeDefined ( ) ;
128129 } ) ;
@@ -134,14 +135,14 @@ describe('Test geolayout', function () {
134135 }
135136 } ;
136137 layoutOut = { } ;
137- GeoLayout . supplyLayoutDefaults ( layoutIn , layoutOut , fullData ) ;
138+ supplyLayoutDefaults ( layoutIn , layoutOut , fullData ) ;
138139 fields . forEach ( function ( field ) {
139140 expect ( layoutOut . geo [ field ] ) . toBeDefined ( ) ;
140141 } ) ;
141142
142143 delete layoutIn . geo . resolution ;
143144 layoutOut = { } ;
144- GeoLayout . supplyLayoutDefaults ( layoutIn , layoutOut , fullData ) ;
145+ supplyLayoutDefaults ( layoutIn , layoutOut , fullData ) ;
145146 fields . forEach ( function ( field ) {
146147 expect ( layoutOut . geo [ field ] ) . toBeUndefined ( ) ;
147148 } ) ;
@@ -151,14 +152,14 @@ describe('Test geolayout', function () {
151152 var fields = [
152153 'showframe' , 'framecolor' , 'framewidth'
153154 ] ,
154- scopes = GeoLayout . layoutAttributes . scope . values ;
155+ scopes = layoutAttributes . scope . values ;
155156
156157 function testOne ( scope ) {
157158 layoutIn = {
158159 geo : { scope : scope }
159160 } ;
160161 layoutOut = { } ;
161- GeoLayout . supplyLayoutDefaults ( layoutIn , layoutOut , fullData ) ;
162+ supplyLayoutDefaults ( layoutIn , layoutOut , fullData ) ;
162163 }
163164
164165 scopes . forEach ( function ( scope ) {
0 commit comments