polyline: Remove deleted marker from internal list

When marker is deleted from line it's left in internal _markers list.
This commit is contained in:
Pavel Shramov 2012-05-25 19:18:53 +04:00
parent 3c8495b6f3
commit 95ae759632

View File

@ -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');