chartjs-plugin-zoom icon indicating copy to clipboard operation
chartjs-plugin-zoom copied to clipboard

Add a function for getting zoom range

Open joshkel opened this issue 2 years ago • 1 comments

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?

joshkel avatar Sep 04 '23 21:09 joshkel

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

trullock avatar Oct 01 '24 09:10 trullock

@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.

kurkle avatar Nov 14 '24 19:11 kurkle

Thanks for taking care of this, @kurkle. I apologize for not following up.

joshkel avatar Nov 20 '24 20:11 joshkel