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:
parent
db8056df45
commit
ab85108836
@ -35,7 +35,9 @@ L.Path = (L.Path.SVG && !window.L_PREFER_CANVAS) || !L.Browser.canvas ? L.Path :
|
|||||||
map
|
map
|
||||||
.off('viewreset', this.projectLatlngs, this)
|
.off('viewreset', this.projectLatlngs, this)
|
||||||
.off('moveend', this._updatePath, this);
|
.off('moveend', this._updatePath, this);
|
||||||
|
if (this.options.clickable) {
|
||||||
|
map.off('click', this._onClick, this);
|
||||||
|
}
|
||||||
this._requestUpdate();
|
this._requestUpdate();
|
||||||
|
|
||||||
this._map = null;
|
this._map = null;
|
||||||
|
Loading…
Reference in New Issue
Block a user