When you zoom in, or out using the buttons, the zoomed event fires. However when you use the reset button no event fires, yet the zoom is changed.
This makes it impossible to track the zoom.
e.g. I have a timeseries showing hits on a website. I want that when the user zooms in it tells me a total of all the hits in that time period, so I hook the zoomed event and filter the data for that period to create the total.
But without zoomed firing on a reset (or without a reset() hook) I can't reset the total, so my total will be incorrect.
OK, so looks like I can use updated and check for ctx.globals.zoomed === false, but I think it would still be sensible to fire zoomed when the zoom changes.
Calling zoomed on reset zoom makes sense. I will fire the zoomed event in reset also.
Thanks! Great library.
Most helpful comment
Calling
zoomedon reset zoom makes sense. I will fire thezoomedevent in reset also.