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) {