Wildhoney / Leaflet.FreeDraw

:earth_asia: FreeDraw allows the free-hand drawing of shapes on your Leaflet.js map layer – providing an intuitive and familiar UX for creating geospatial boundaries similar to Zoopla and others. Included out-of-the-box is the concaving of polygons, polygon merging and simplifying, as well as the ability to add edges and modify existing shapes.
https://freedraw.herokuapp.com/
MIT License
544 stars 103 forks source link

Error with mergePolygons option #98

Open treyhakanson opened 7 years ago

treyhakanson commented 7 years ago

If the mergePolygons option is set to false, editing a particular edge of a polygon multiple times will cause the 'markers' event to be fired one additional time for each time the edge was moved.

Example: if a square is drawn, and the upper right point is dragged 3 separate times, 'markers' will fire:

For a total of 6 firings, instead of the expected 3. Currently working on the issue, but any insight into why this may be occurring would be helpful.