ebrelsford / Leaflet.loading

A simple loading control for Leaflet
MIT License
143 stars 49 forks source link

Container border on touch #39

Closed torsture closed 7 years ago

torsture commented 7 years ago

Thanks for a great plugin!

I found a small problem. When using this plugin on a touch device the border of the _container is visible as a dot when the loading indicator is hidden.

I added display none/block to the container when hiding/showing the indicator which solved the problem, but i belive this needs to be fixed in the upcomming versions. Also fiering hide/show events would be nice.

Thanks again

ebrelsford commented 7 years ago

Thanks for this @torsture. Mind posting a minimal example of what you're seeing? I am having a hard time recreating it on my touch devices, so I'm wondering if there is something in your CSS that is leading to it?

torsture commented 7 years ago

Sorry, I should’ve been more thorough when describing the problem. I’m using the plugin with leaflet-0.7.3 and in separate-mode, same as your separate example. I checked it out and get the same problem in the example(http://ebrelsford.github.io/Leaflet.loading/separate.html), I’ve tested with both a touchscreen laptop and my android smartphone and get the problem in both so you should be able to replicate it using your own demo. Leaflet adds the css class “leaflet-touch” to the map container when a touch-device is running the map, I've also tried adding this class manually on nontouch devices and get the same issue, so you can also use this to replicate the problem.

Hope this helps.

ebrelsford commented 7 years ago

Got it. Would you be interested in submitting a pull request? Otherwise I should be able to get to this soon enough.

On Wed, Jan 18, 2017, 4:37 AM torsture notifications@github.com wrote:

Sorry, I should’ve been more thorough when describing the problem. I’m using the plugin with leaflet-0.7.3 and in separate-mode, same as your separate example. I checked it out and get the same problem in the example( http://ebrelsford.github.io/Leaflet.loading/separate.html), I’ve tested with both a touchscreen laptop and my android smartphone and get the problem in both so you should be able to replicate it using your own demo. Leaflet adds the css class “leaflet-touch” to the map container when a touch-device is running the map, I've also tried adding this class manually on nontouch devices and get the same issue, so you can also use this to replicate the problem.

Hope this helps.

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/ebrelsford/Leaflet.loading/issues/39#issuecomment-273427785, or mute the thread https://github.com/notifications/unsubscribe-auth/AAW42lv3jY0eJN-d-madRogo2bedLO6eks5rTd1HgaJpZM4LlaPR .

torsture commented 7 years ago

I'm kinda new to github so I think it's for the best if you take care of it.

torsture commented 7 years ago

Works like a charm, nice work thank you!