From c916a67ae0efd9d2fd076b3716b4139d8e7facba Mon Sep 17 00:00:00 2001 From: Philip Beelmann Date: Thu, 27 Apr 2023 09:27:57 +0000 Subject: [PATCH] bugfix --- umap/static/umap/js/umap.controls.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/umap/static/umap/js/umap.controls.js b/umap/static/umap/js/umap.controls.js index 3f61c09a..1dfe44da 100644 --- a/umap/static/umap/js/umap.controls.js +++ b/umap/static/umap/js/umap.controls.js @@ -1262,7 +1262,7 @@ L.U.Editable = L.Editable.extend({ content = L._('Click to start drawing a line'); } } else { - var tmpLatLngs = this.editor._drawnLatLngs.slice(); + var tmpLatLngs = e.layer.editor._drawnLatLngs.slice(); tmpLatLngs.push(e.latlng); var readableDistance = e.layer.getMeasure(tmpLatLngs); if (e.layer.editor._drawnLatLngs.length < e.layer.editor.MIN_VERTEX) {