chartjs-plugin-zoom
chartjs-plugin-zoom copied to clipboard
Add a function for getting zoom range
This adds a function, getZoomedScaleBounds, to act as a counterpart to getInitialScaleBounds (getting the scale ranges after zoom rather than before) and zoomScale (reading, rather than writing, each scale's zoom).
A question for code review: Is it okay to return the internal object directly, or should I return a new object to ensure that it can't be mutated?
This is merged into my fork at https://github.com/trullock/chartjs-plugin-zoom which is published on npm as @trullock/chartjs-plugin-zoom, as this fork seems abandoned
@joshkel would you be able to resolve the merge conflicts in this?
A question for code review: Is it okay to return the internal object directly, or should I return a new object to ensure that it can't be mutated?
I think its better to return a new object, as you did.
Thanks for taking care of this, @kurkle. I apologize for not following up.