From 957ddebb67ebe7d62bf3c937c15039fed4e6bb58 Mon Sep 17 00:00:00 2001 From: muerwre Date: Thu, 7 Feb 2019 11:32:51 +0700 Subject: [PATCH] fixed empty polyline drawing --- src/utils/EditablePolyline.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/utils/EditablePolyline.js b/src/utils/EditablePolyline.js index 7ad4ad3..27827ca 100644 --- a/src/utils/EditablePolyline.js +++ b/src/utils/EditablePolyline.js @@ -100,6 +100,8 @@ L.Polyline.polylineEditor = L.Polyline.extend({ this._map.off('click', this._addPointForward); this._map.off('click', this._addFirstPoint); + + if (this._markers.length <= 1) this.editor.clear(); }, reset: () => {