leaflet-geoman icon indicating copy to clipboard operation
leaflet-geoman copied to clipboard

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

Open rallep opened this issue 2 years ago β€’ 2 comments
trafficstars

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

rallep avatar Feb 01 '23 09:02 rallep

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

Falke-Design avatar Feb 01 '23 20:02 Falke-Design

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

rallep avatar Feb 02 '23 07:02 rallep