jieter / Leaflet.Sync

Synchronized view of two maps.
http://jieter.github.io/Leaflet.Sync/examples/dual.html
BSD 3-Clause "New" or "Revised" License
235 stars 53 forks source link

Added min zoom check before setView #25

Closed dijam closed 7 years ago

dijam commented 8 years ago

Another need that I felt was about when we have layers with different zoom level. So if the zoom level of the original map is more than the min zoom, it goes out of sync. One map zooms and the other stays. I had this fix for our project to stop zooming for the original and keep it to that zoom level. I am still thinking about unittest part of it but thought to open up the pull request so we can discuss the need of it or maybe improve the change.

jieter commented 8 years ago

Hmm, interesting problem. I think this deserves a comment in the code to make clear what happens for future reference.

And definitely needs a unit test too.

(Just pushed some changes to make CI work again)

jieter commented 8 years ago

@dijam still interested in adding a unittest for this?

dijam commented 8 years ago

@jieter I totally forgot about it. I've been super busy with other projects. I can see if I can manage to clean this PR and add some unittests for it :)

jieter commented 7 years ago

@dijam I'm going to close this. If you still have the need and interest to fix this, please open a new PR on top of current master.