Skip to content

Commit 598e637

Browse files
authored
Merge branch 'master' into master
2 parents 9c7a0eb + dcb0c85 commit 598e637

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

src/components/LMap.vue

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ export default {
203203
);
204204
this.mapObject = map(this.$el, options);
205205
if (this.bounds) {
206-
this.mapObject.fitBounds(this.bounds);
206+
this.fitBounds(this.bounds);
207207
}
208208
this.debouncedMoveEndHandler = debounce(this.moveEndHandler, 100);
209209
this.mapObject.on('moveend', this.debouncedMoveEndHandler);
@@ -305,7 +305,7 @@ export default {
305305
const oldBounds = this.lastSetBounds || this.mapObject.getBounds();
306306
const boundsChanged = !oldBounds.equals(newBounds, 0); // set maxMargin to 0 - check exact equals
307307
if (boundsChanged) {
308-
this.mapObject.fitBounds(newBounds, this.fitBoundsOptions);
308+
this.fitBounds(newBounds);
309309
this.cacheMapView(newBounds);
310310
}
311311
},
@@ -322,12 +322,10 @@ export default {
322322
const mapObject = this.mapObject,
323323
prevBounds = mapObject.getBounds();
324324
mapObject.options.crs = newVal;
325-
mapObject.fitBounds(prevBounds, { animate: false, padding: [0, 0] });
325+
this.fitBounds(prevBounds, { animate: false });
326326
},
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 });
331329
},
332330
moveEndHandler() {
333331
/**

tests/mixin-tests/path-tests.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,8 @@ export const testPathFunctionality = (component, componentName = 'it') => {
9090
expect(wrapper.vm.mapObject.options.weight).toEqual(weight);
9191
});
9292

93-
test(`${componentName} updates weight when prop changes`, async () => {
93+
// Disable this till https://github.com/Leaflet/Leaflet/pull/6671 is merged on leaflet side
94+
test.skip(`${componentName} updates weight when prop changes`, async () => {
9495
const { wrapper } = getWrapperWithMap(component, { weight: 1 });
9596

9697
const newWeight = 5;

0 commit comments

Comments
 (0)