geoman-io / leaflet-geoman

🍂🗺️ The most powerful leaflet plugin for drawing and editing geometry layers
https://geoman.io
MIT License
2.2k stars 433 forks source link

When drawing shapes points, lines and polygons vertex is added on mousedown+move #1301

Open rallep opened 1 year ago

rallep commented 1 year ago

Hi, first of all thank you for a great project.

I am using version 2.14.1 of Geoman as an ES6 module in a React 18 project (I am not using react-leaflet, but pure leaflet). When drawing shapes like points, lines and polygons and clicking the map and dragging it, a vertex is added, which has not always been the case. Previously, on events mousedown+move a vertex would not be added, which is also the desired behaviour because sometimes when drawing you want to displace the map before adding a vertex.

Also, when drawing squares and circles it has the desired behaviour, where a vertex/marker is not added when dragging the map. Furthermore, it is not consistent when drawing points, lines and polygons, sometimes a vertex is not added.

I can't reproduce the behaviour on https://geoman.io/leaflet-geoman so I am in doubt if this is a Geoman issues, a leaflet issue or a combination between leaflet/geoman/React.

https://user-images.githubusercontent.com/11444820/216000964-c978ceb6-4823-4dcb-8f16-ea121b7c9afc.mov

Falke-Design commented 1 year ago

Can you please create a sandbox / demo where we can analyse this?

rallep commented 1 year ago

Yes sorry for the lazy approach :-) I will try to string something together a.s.a.p.