Closed soulfresh closed 4 years ago
It feels like that logic belongs to userland - this lib just provides an event with pan-zoom stats.
Fair point. I went this direction for efficiency but you're probably right. Since I ended up forking this project with this and other features, I'll close this PR and keep the changes in my fork.
What does this PR do?
Updates the API to allow users to disable or enable panning or zooming individually. This is useful if implementing a UI where the user needs to drag map pins on a map. In this situation, it can be useful to disable panning when the user hovers a map pin and then re-enable panning once the mouse leaves the map pin.
I tried to make this API backwards compatible by adding the enable/disable methods as properties on the returned destroy function.