Path CANVAS adds a click event if clickable but do not clear it on remove. This adds the necessary remove listener.

This commit is contained in:
jfgirard 2012-11-12 11:11:16 -05:00
parent db8056df45
commit ab85108836

View File

@ -35,7 +35,9 @@ L.Path = (L.Path.SVG && !window.L_PREFER_CANVAS) || !L.Browser.canvas ? L.Path :
map
.off('viewreset', this.projectLatlngs, this)
.off('moveend', this._updatePath, this);
if (this.options.clickable) {
map.off('click', this._onClick, this);
}
this._requestUpdate();
this._map = null;