X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/feeb135760abdbfef0eea193318566d9d96f2523..3e405040eaa0f0e086ea22ff3934a2adfcb851b6:/vendor/assets/leaflet/leaflet.js diff --git a/vendor/assets/leaflet/leaflet.js b/vendor/assets/leaflet/leaflet.js index b972941d9..0f0b01be2 100644 --- a/vendor/assets/leaflet/leaflet.js +++ b/vendor/assets/leaflet/leaflet.js @@ -1704,7 +1704,7 @@ L.Map = L.Class.extend({ removeLayer: function (layer) { var id = L.stamp(layer); - if (!this._layers[id]) { return; } + if (!this._layers[id]) { return this; } if (this._loaded) { layer.onRemove(this); @@ -1773,11 +1773,7 @@ L.Map = L.Class.extend({ this._rawPanBy(offset); } - this.fire('move'); - - // make sure moveend is not fired too often on resize - clearTimeout(this._sizeTimer); - this._sizeTimer = setTimeout(L.bind(this.fire, this, 'moveend'), 200); + this.fire('move').fire('moveend'); } return this.fire('resize', {