From 826587fee8b8c88abac51347d29d4d12285e821e Mon Sep 17 00:00:00 2001 From: Gog Date: Thu, 31 Mar 2016 16:41:14 +0400 Subject: [PATCH] [fix] not all hooks are removed after stopping the editing --- src/edit/handler/EditToolbar.Edit.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/edit/handler/EditToolbar.Edit.js b/src/edit/handler/EditToolbar.Edit.js index 978479c85..986d5eda6 100644 --- a/src/edit/handler/EditToolbar.Edit.js +++ b/src/edit/handler/EditToolbar.Edit.js @@ -65,7 +65,7 @@ L.EditToolbar.Edit = L.Handler.extend({ .on('touchmove', this._onMouseMove, this) .on('MSPointerMove', this._onMouseMove, this) .on('click', this._editStyle, this) - .on('draw:editvertex', this._updateTooltip, this); + .on('draw:editvertex', this._updateTooltip, this); } }, @@ -83,7 +83,9 @@ L.EditToolbar.Edit = L.Handler.extend({ this._map .off('mousemove', this._onMouseMove, this) .off('touchmove', this._onMouseMove, this) - .off('MSPointerMove', this._onMouseMove, this); + .off('MSPointerMove', this._onMouseMove, this) + .off('click', this._editStyle, this) + .off('draw:editvertex', this._updateTooltip, this); } },