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);
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', {