Leaflet / Leaflet.draw

Vector drawing and editing plugin for Leaflet
https://leaflet.github.io/Leaflet.draw/docs/leaflet-draw-latest.html
MIT License
1.98k stars 994 forks source link

CSS Zooming offsets Mouse/Draw-events. #981

Open Vadelius opened 4 years ago

Vadelius commented 4 years ago

How to reproduce

goto => https://leaflet.github.io/Leaflet.draw/docs/examples/full.html

increase or decrease zoomlevel with document.body.style.zoom = "0.8" || document.documentElement.style.zoom = "1.25"

What behaviour I'm expecting and which behaviour I'm seeing

Drawing/cursor-event is now off-set by x pixels (probably because screen or pagecordinates are used on the event) This might be intended behaviour? (Browser-zooming works as expected however) with the correct offset after zooming in/out.