Browse files

polyline: Remove deleted marker from internal list

When marker is deleted from line it's left in internal _markers list.
  • Loading branch information...
1 parent 3c8495b commit 95ae7596320587c17f10e7e36bf953e29a0332d3 Pavel Shramov committed May 25, 2012
Showing with 1 addition and 0 deletions.
  1. +1 −0 src/layer/vector/Polyline.Edit.js
View
1 src/layer/vector/Polyline.Edit.js
@@ -124,6 +124,7 @@ L.Handler.PolyEdit = L.Handler.extend({
if (marker._middleRight) {
this._markerGroup.removeLayer(marker._middleRight);
}
+ this._markers.splice(i, 1);
this._poly.spliceLatLngs(i, 1);
this._updateIndexes(i, -1);
this._poly.fire('edit');

0 comments on commit 95ae759

Please sign in to comment.