Into my application I use L.Draw plugin and I need to use (into a my specific application feature) a custom editing logic (for example I have to change the way to show the edit-markers) for a Polygon.
I analized the L.draw code and I think that I have to override the
_initMarkers function that it is present into
L.Edit.PolyVerticesEdit is initialized in the
_initHandlers function that it is present into the
L.Edit.Poly is initialized in the
If this my analysis is correct, I think that I need of:
- A custom handler (like Rectangle, Polyline, Marker, etc). for example '
L.MyHandler' that it extends the
Polygonbase handler (I already have others custom handlers).
- I have to define a custom
PolyVerticesEditand a custom
L.Edit.MyHandlerto use the custom
_initMarkersfunction only when the custom handler is used;
In theory, I think that is a solution because, in my application, a need to have this custom edit mode and the class L.Draw editing logic also (for other application features);
But I think that it is strange to have this big override flow only to have a custom editing logic.
Is correct this my solution? Is there a different approach?