Browse files

Bugfix: Proper cleanup of marker editing handler when it is disabled.

This fixes a critical bug which occurs if editing is enabled, disabled
and enabled again. Since line 16 checks for existence of marker group
reference, markers never get reinitiated, causing the handler to use
the old ones, which may have been changed in the last editing session.
  • Loading branch information...
1 parent 401a6e2 commit 5437de4116aa43259105652f07246c164fc1f6c2 @mehmeta mehmeta committed Mar 2, 2012
Showing with 2 additions and 0 deletions.
  1. +2 −0 src/layer/vector/Polyline.Edit.js
@@ -24,6 +24,8 @@ L.Handler.PolyEdit = L.Handler.extend({
if (this._poly._map) {
+ delete this._markerGroup;
+ delete this._markers;
updateMarkers: function () {

0 comments on commit 5437de4

Please sign in to comment.