OnZoomComplete callback final event to call a local method
Hi,
Currently, we get lots of onZoomComplete() callbacks even with a single mouse wheel scroll. We need to call a local method after the user done with the actual zoom completion.
Is there any way we can detect once when all the mouse wheel events are done so that we can call our local method after the zoom?
onZoomComplete is already debounced at 250ms. (I would love to see an option to configure or disable that debouncing.) If you are seeing multiple calls to onZoomComplete you will need to add your own debouncing with a greater timeout
I ended up ignoring onZoomComplete and putting a debounced function call in onZoom which gave me the control I needed.
` const debounced = _.debounce(yourFunction, 500);
onZoom: () => { debounced(); } `
Is there any way we can detect once when all the mouse wheel events are done so that we can call our local method after the zoom?
No, user could go to have a coffee at the next city and come back after 4 hours to continuing zooming 😃
But maybe the hardcoded 250ms can be exposed as an option, so you can configure it to suit the actual use case better. Would that help?
Exposing the debounce time with an option to disable it completely would be great. Maybe 0 and or null instead of a number to disable.