During editing, if a Poly marker is being dragged (whenallowIntersection is false) and the marker intersects itself, the handler will call _onMarkerClick which will simulate clicking the marker. This will remove the marker from the polygon instead of reverting back to its original position (which is the more user-friendly option).
|
this._onMarkerClick(e); // Remove violating marker |
The comments in the source indicate the marker is reverted to its original position, but its a lie.
During editing, if a Poly marker is being dragged (when
allowIntersectionis false) and the marker intersects itself, the handler will call_onMarkerClickwhich will simulate clicking the marker. This will remove the marker from the polygon instead of reverting back to its original position (which is the more user-friendly option).Leaflet.draw/src/edit/handler/Edit.Poly.js
Line 270 in eb17e63
The comments in the source indicate the marker is reverted to its original position, but its a lie.