mirror of
https://github.com/umap-project/umap.git
synced 2025-04-29 11:52:38 +02:00
chore: do not try to remove an icon not in DOM
This occurs when using cluster, which already add/remove markers
This commit is contained in:
parent
c6da1f91cf
commit
ca3451ce14
1 changed files with 6 additions and 0 deletions
|
@ -36,6 +36,12 @@ const FeatureMixin = {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
_removeIcon: function () {
|
||||||
|
// It may not be in the DOM, and Leaflet does not deal with this
|
||||||
|
// situation
|
||||||
|
if (this._icon) Marker.prototype._removeIcon.call(this)
|
||||||
|
},
|
||||||
|
|
||||||
addInteractions: function () {
|
addInteractions: function () {
|
||||||
this.on('contextmenu editable:vertex:contextmenu', this.onContextMenu)
|
this.on('contextmenu editable:vertex:contextmenu', this.onContextMenu)
|
||||||
this.on('click', this.onClick)
|
this.on('click', this.onClick)
|
||||||
|
|
Loading…
Reference in a new issue