ebrelsford / Leaflet.loading

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

Fix Dangling Container on Remove #8

Closed nickiaconis closed 11 years ago

nickiaconis commented 11 years ago

If the loadingControl was separate from the zoomControl, removing it left behind its container. This fixes the issue by calling the overridden removeFrom() method when the indicator is separate.

ebrelsford commented 11 years ago

Thanks a lot! Merged with slight update (f72c4fc) for the zoomControl option added in cb652bf.

nickiaconis commented 11 years ago

I was thinking about that earlier, since map.zoomControl won't exist if the zoom control is added after map init. Awesome!