mirror of
https://github.com/umap-project/umap.git
synced 2025-04-28 19:42:36 +02:00
fix: error after deleting a path that was previously moved
When moving a path, this will put a once time listener on "moveend". If we delete this feature, and move the map, we should not execute the event callback. A better fix would be to cancel the event listener on delete, but that is much more work given how we deal with Leaflet events right now.
This commit is contained in:
parent
cc2f4ef81f
commit
c985cb3de5
1 changed files with 2 additions and 0 deletions
|
@ -267,6 +267,8 @@ const PathMixin = {
|
||||||
},
|
},
|
||||||
|
|
||||||
makeGeometryEditable: function () {
|
makeGeometryEditable: function () {
|
||||||
|
// Feature has been removed since then?
|
||||||
|
if (!this._map) return
|
||||||
if (this._map._umap.editedFeature !== this.feature) {
|
if (this._map._umap.editedFeature !== this.feature) {
|
||||||
this.disableEdit()
|
this.disableEdit()
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in a new issue