@@ -181,13 +181,19 @@ proto.updateProjection = function(fullLayout, geoLayout) {
181
181
var lataxis = geoLayout . lataxis ;
182
182
var rangeBox = makeRangeBox ( lonaxis . range , lataxis . range ) ;
183
183
184
+
185
+ this . rangeBox = rangeBox ;
186
+
184
187
// fit projection 'scale' and 'translate' to set lon/lat ranges
185
188
projection . fitExtent ( extent , rangeBox ) ;
186
189
187
190
var b = this . bounds = projection . getBounds ( rangeBox ) ;
188
191
var s = this . fitScale = projection . scale ( ) ;
189
192
var t = projection . translate ( ) ;
190
193
194
+ console . log ( 'range' , lonaxis . range , lataxis . range )
195
+ console . log ( 'bounds' , b [ 0 ] , b [ 1 ] )
196
+
191
197
if (
192
198
! isFinite ( b [ 0 ] [ 0 ] ) || ! isFinite ( b [ 0 ] [ 1 ] ) ||
193
199
! isFinite ( b [ 1 ] [ 0 ] ) || ! isFinite ( b [ 1 ] [ 1 ] ) ||
@@ -249,7 +255,7 @@ proto.updateBaseLayers = function(fullLayout, geoLayout) {
249
255
}
250
256
251
257
function isLineLayer ( d ) {
252
- return Boolean ( constants . lineLayers [ d ] ) ;
258
+ return Boolean ( constants . lineLayers [ d ] ) || d === 'rangebox' ;
253
259
}
254
260
255
261
function isFillLayer ( d ) {
@@ -266,6 +272,8 @@ proto.updateBaseLayers = function(fullLayout, geoLayout) {
266
272
true ;
267
273
} ) ;
268
274
275
+ // layerData.push('rangebox');
276
+
269
277
var join = _this . framework . selectAll ( '.layer' )
270
278
. data ( layerData , String ) ;
271
279
@@ -308,6 +316,13 @@ proto.updateBaseLayers = function(fullLayout, geoLayout) {
308
316
var path = basePaths [ d ] ;
309
317
var adj = constants . layerNameToAdjective [ d ] ;
310
318
319
+ if ( d === 'rangebox' ) {
320
+ path . datum ( _this . rangeBox )
321
+ . style ( 'stroke' , 'red' )
322
+ . style ( 'stroke-width' , '4px' )
323
+ return ;
324
+ }
325
+
311
326
if ( d === 'frame' ) {
312
327
path . datum ( constants . sphereSVG ) ;
313
328
} else if ( isLineLayer ( d ) || isFillLayer ( d ) ) {
0 commit comments