diff --git a/RELEASE-NOTES.md b/RELEASE-NOTES.md index bdd104ca0..0286b0408 100644 --- a/RELEASE-NOTES.md +++ b/RELEASE-NOTES.md @@ -6,6 +6,7 @@ different releases and which versions of PHP and MediaWiki they support, see the ## Maps 7.15.1 * Fixed `geojson` parameter in the Leaflet result format (7.12.0 regression) +* Fixed `center` parameter for Leaflet (7.12.0 regression) ## Maps 7.15.0 diff --git a/resources/leaflet/jquery.leaflet.js b/resources/leaflet/jquery.leaflet.js index 460f71c50..2f2c5a798 100644 --- a/resources/leaflet/jquery.leaflet.js +++ b/resources/leaflet/jquery.leaflet.js @@ -310,17 +310,17 @@ }; this.centerAndZoomMap = function() { - this.map.fitWorld(); this.fitContent(); if (options.zoom !== false) { - this.map.setZoom(options.zoom); + this.map.setZoom(options.zoom, {animate: false}); } if (options.centre !== false) { this.map.setView( new L.LatLng(options.centre.lat, options.centre.lon), - this.map.getZoom() + this.map.getZoom(), + {animate: false} ); } }; @@ -332,11 +332,12 @@ if (bounds.getNorthEast().equals(bounds.getSouthWest())) { this.map.setView( bounds.getCenter(), - options.defzoom + options.defzoom, + {animate: false} ); } else { - this.map.fitBounds(bounds); + this.map.fitBounds(bounds, {animate: false}); } } };