Leaflet / Leaflet.fullscreen

A fullscreen control for Leaflet
http://leaflet.github.io/Leaflet.fullscreen/
ISC License
436 stars 117 forks source link

Full screen not center on devices with touch screen #50

Closed simonvandel closed 6 years ago

simonvandel commented 8 years ago

This fixes a bug on devices with touch screens that causes the full screen icon to be off-center.

Before: http://imgur.com/FaGVwrt After: http://imgur.com/xgQgfYe

jfirebaugh commented 8 years ago

Thanks for the contribution! However, are you sure about this change? This CSS was specifically added to fix icon alignment in #31.

simonvandel commented 8 years ago

Yes, I saw that. Weird. However it has fixed the alignment issue in all my test cases. You should however please confirm this!

Ronnnn commented 8 years ago

Tried the above solution but did not work for me (only uncentered the full screen button on touch devices as already said). Any idea on how to solve this issue?

I'm using Angular-leaflet-directive in combination with Leaflet.fullscreen. After clicking the fullscreen button the map is shown larger but the center is off. I've also enabled pseudoFullscreen as IOS has no support for this. I suspect that this option somehow confuses Leaflet on how to calculate sizes.