merge #1834 (passing options to setMaxBounds)

This commit is contained in:
Vladimir Agafonkin 2013-07-11 13:03:41 +03:00
commit 183c8a2cb7
2 changed files with 3 additions and 2 deletions

View File

@ -22,6 +22,7 @@ An in-progress version being developed on the `stable` branch.
* Fixed a regression where `Marker` shadow didn't animate on zoom after using `setIcon`. [#1768](https://github.com/Leaflet/Leaflet/issues/1768)
* Fixed a bug where `FeatureGroup` still fired `layerremove` event on `removeLayer` even if the given layer wan't present in the group. [#1847](https://github.com/Leaflet/Leaflet/issues/1847)
* Fixed a bug where `Marker` `setOpacity` wasn't returning the marker (by [@freepius44](https://github.com/freepius44)). [#1851](https://github.com/Leaflet/Leaflet/issues/1851)
* Added ability to pass zoom/pan animation options to `setMaxBounds` (by [@davidjb](http://git.io/djb)). [#1834](https://github.com/Leaflet/Leaflet/pull/1834)
## 0.6.2 (June 28, 2013)

View File

@ -114,7 +114,7 @@ L.Map = L.Class.extend({
return this.fire('moveend');
},
setMaxBounds: function (bounds) {
setMaxBounds: function (bounds, options) {
bounds = L.latLngBounds(bounds);
this.options.maxBounds = bounds;
@ -131,7 +131,7 @@ L.Map = L.Class.extend({
if (this._loaded) {
if (this._zoom < minZoom) {
this.setView(bounds.getCenter(), minZoom);
this.setView(bounds.getCenter(), minZoom, options);
} else {
this.panInsideBounds(bounds);
}