@@ -203,7 +203,7 @@ export default {
203
203
);
204
204
this .mapObject = map (this .$el , options);
205
205
if (this .bounds ) {
206
- this .mapObject . fitBounds (this .bounds );
206
+ this .fitBounds (this .bounds );
207
207
}
208
208
this .debouncedMoveEndHandler = debounce (this .moveEndHandler , 100 );
209
209
this .mapObject .on (' moveend' , this .debouncedMoveEndHandler );
@@ -305,7 +305,7 @@ export default {
305
305
const oldBounds = this .lastSetBounds || this .mapObject .getBounds ();
306
306
const boundsChanged = ! oldBounds .equals (newBounds, 0 ); // set maxMargin to 0 - check exact equals
307
307
if (boundsChanged) {
308
- this .mapObject . fitBounds (newBounds, this . fitBoundsOptions );
308
+ this .fitBounds (newBounds);
309
309
this .cacheMapView (newBounds);
310
310
}
311
311
},
@@ -322,12 +322,10 @@ export default {
322
322
const mapObject = this .mapObject ,
323
323
prevBounds = mapObject .getBounds ();
324
324
mapObject .options .crs = newVal;
325
- mapObject .fitBounds (prevBounds, { animate: false , padding : [ 0 , 0 ] });
325
+ this .fitBounds (prevBounds, { animate: false });
326
326
},
327
- fitBounds (bounds ) {
328
- this .mapObject .fitBounds (bounds, {
329
- animate: this .noBlockingAnimations ? false : null ,
330
- });
327
+ fitBounds (bounds , overrideOptions ) {
328
+ this .mapObject .fitBounds (bounds, { ... this .fitBoundsOptions , ... overrideOptions });
331
329
},
332
330
moveEndHandler () {
333
331
/**
0 commit comments