diff --git a/umap/static/umap/js/modules/data/features.js b/umap/static/umap/js/modules/data/features.js index 38a4c8b0..513ac0b3 100644 --- a/umap/static/umap/js/modules/data/features.js +++ b/umap/static/umap/js/modules/data/features.js @@ -218,6 +218,7 @@ class Feature { edit(event) { if (!this._umap.editEnabled || this.isReadOnly()) return + if (this._umap.editedFeature === this) return const container = DomUtil.create('div', 'umap-feature-container') DomUtil.createTitle( container, @@ -326,7 +327,9 @@ class Feature { ] } - endEdit() {} + endEdit() { + this.ui.disableEdit() + } getDisplayName() { const keys = U.LABEL_KEYS.slice() // Copy. @@ -828,11 +831,6 @@ class Path extends Feature { ) } - endEdit() { - this.ui.disableEdit() - super.endEdit() - } - transferShape(at, to) { const shape = this.ui.enableEdit().deleteShapeAt(at) // FIXME: make Leaflet.Editable send an event instead diff --git a/umap/static/umap/js/modules/rendering/ui.js b/umap/static/umap/js/modules/rendering/ui.js index 6f18bbda..05b805a8 100644 --- a/umap/static/umap/js/modules/rendering/ui.js +++ b/umap/static/umap/js/modules/rendering/ui.js @@ -111,7 +111,6 @@ const PointMixin = { this.on('dragend', (event) => { this.isDirty = true this.feature.edit(event) - // this.feature.pullGeometry(false) }) if (!this.feature.isReadOnly()) this.on('mouseover', this._enableDragging) this.on('mouseout', this._onMouseOut) diff --git a/umap/static/umap/js/modules/umap.js b/umap/static/umap/js/modules/umap.js index 299d98ed..51c98552 100644 --- a/umap/static/umap/js/modules/umap.js +++ b/umap/static/umap/js/modules/umap.js @@ -525,7 +525,6 @@ export default class Umap { 'Ctrl+e': { if: () => this.hasEditMode(), do: () => { - console.log('doing') if (!this.editEnabled) this.enableEdit() else if (!this.isDirty) this.disableEdit() },