digidem / leaflet-side-by-side

A Leaflet control to add a split screen to compare two map overlays
http://lab.digital-democracy.org/leaflet-side-by-side/
MIT License
351 stars 111 forks source link

Removing layers from the control does not restore them to both sides #15

Open RacingTadpole opened 7 years ago

RacingTadpole commented 7 years ago

This is a very handy control - thanks for developing it! I'd like to be able to add multiple layers to either both sides, the left side and/or the right side - and then shift them around between sides. This mostly works, but when a layer is removed from the side-by-side control, its clip property is not removed, stranding it on whichever side it was on, and not updating when the control's position changes. I have some changes which should address this, which I'll submit as a PR.