brunob/leaflet.fullscreen

full screen with leaflet draw looses draw control for circle and rectangle

jayasai470 opened this issue · 3 comments

steps to reproduce

https://jsfiddle.net/x34opkq2/

click on create new Rectangle button (do not click on the map)
click on full screen control
we can't draw rectangle properly some times in full screen mode
exit full screen we can't see the drawn items
we can see the draw control is released and when we click on exit full screen unlike zoom in and out control.

Your fiddle use https://api.mapbox.com/mapbox.js/plugins/leaflet-fullscreen/v1.0.1/Leaflet.fullscreen.min.js which is not related to this repo, closing for now.

Hi @brunob I have created another fiddle
https://jsfiddle.net/9uL0etop/
using this https://unpkg.com/leaflet.fullscreen@1.5.0/Control.FullScreen.js
and I can still see the error. Please let me know if this is not the plugin

we can't draw rectangle properly some times in full screen mode

What do you mean by "some times" ? I can draw the rectangle when following the path you describe, but i see a bug : the rectangle start drawing when i press the fullscreen control, this seems to trigger a click event on the map, so it starts the drawing handler. Not sure, but it may be fixed in leaflet draw instead.

exit full screen we can't see the drawn items

I dont' reproduce this.