Fire 'viewreset' on map.stop(), fixes #3985

This commit is contained in:
Iván Sánchez Ortega 2016-04-02 18:18:05 +02:00 committed by Yohan Boniface
parent 714cbb9ec6
commit 86a7f79dc9

View File

@ -378,6 +378,9 @@ L.Map = L.Evented.extend({
// Stops the currently running `panTo` or `flyTo` animation, if any.
stop: function () {
this.setZoom(this._limitZoom(this._zoom));
if (!this.options.zoomSnap) {
this.fire('viewreset');
}
return this._stop();
},