Skip to content

Commit 26f183b

Browse files
committed
Rename fit bounds
1 parent f121429 commit 26f183b

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

‎src/plots/map/layout_defaults.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ function handleDefaults(containerIn, containerOut, coerce, opts) {
3232
var { minLat, maxLat } = getMinBoundLat(lat);
3333
// this param is called bounds in mapLibre ctor
3434
// not to be confused with maxBounds aliased below
35-
containerOut.fitBounds = {
35+
containerOut._fitBounds = {
3636
west: minLon,
3737
east: maxLon,
3838
south: minLat,

‎src/plots/map/map.js‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,9 @@ proto.createMap = function(calcData, fullLayout, resolve, reject) {
8080

8181
var bounds = opts.bounds;
8282
var maxBounds = bounds ? [[bounds.west, bounds.south], [bounds.east, bounds.north]] : null;
83-
var fitBounds = opts.fitBounds ? [
84-
[opts.fitBounds.west, opts.fitBounds.south],
85-
[opts.fitBounds.east, opts.fitBounds.north],
83+
var _fitBounds = opts._fitBounds ? [
84+
[opts._fitBounds.west, opts._fitBounds.south],
85+
[opts._fitBounds.east, opts._fitBounds.north],
8686
] : null;
8787

8888
// create the map!
@@ -94,7 +94,7 @@ proto.createMap = function(calcData, fullLayout, resolve, reject) {
9494
zoom: opts.zoom,
9595
bearing: opts.bearing,
9696
pitch: opts.pitch,
97-
bounds: fitBounds,
97+
bounds: _fitBounds,
9898
fitBoundsOptions: {
9999
padding: 20,
100100
},
@@ -342,8 +342,8 @@ proto.updateLayout = function(fullLayout) {
342342
if(!this.dragging && !this.wheeling) {
343343
map.setCenter(convertCenter(opts.center));
344344
map.setZoom(opts.zoom);
345-
if (opts.fitBounds) {
346-
var { west, south, east, north } = opts.fitBounds
345+
if (opts._fitBounds) {
346+
var { west, south, east, north } = opts._fitBounds
347347
map.fitBounds([[west, south], [east, north]], { padding: 20 })
348348
}
349349
map.setBearing(opts.bearing);

0 commit comments

Comments
 (0)