Call commitDrawing instead of stopDrawing on ESC

fix #1428
This commit is contained in:
Yohan Boniface 2023-11-29 16:32:22 +01:00
parent 34e0461ca8
commit 60c002f94a

View file

@ -559,7 +559,7 @@ L.U.Map.include({
this.help.show('edit') this.help.show('edit')
} }
if (e.keyCode === L.U.Keys.ESC) { if (e.keyCode === L.U.Keys.ESC) {
if (this.editEnabled) this.editTools.stopDrawing() if (this.editEnabled) this.editTools.commitDrawing()
if (this.measureTools.enabled()) this.measureTools.stopDrawing() if (this.measureTools.enabled()) this.measureTools.stopDrawing()
} }
} }