Nonlinear scales failed to resolve "original" within panNumericalScale.
To fix this:
Resolving "original" within panNumericalScale seemed redundant, when updateRange was already doing it, so I instead moved the logic into updateRange and control it with a new special value for the zoom parameter. (Hopefully the use of a special string like this is acceptable as long as JSDoc calls it out - if I should use another approach, please let me know.)
This change put updateRange over the configured ESLint complexity limit, so I extracted a new getScaleLimits function to reduce complexity.
Add unit tests, both for this bug and for the preexisting but untested "original" feature.
I wanted JSDoc + TypeScript checks to help validate and document these changes, but that exposed apparent limitations of Chart.js core's type definitions. I'll open a separate PR for those.
Nonlinear scales failed to resolve "original" within panNumericalScale.
To fix this:
zoom
parameter. (Hopefully the use of a special string like this is acceptable as long as JSDoc calls it out - if I should use another approach, please let me know.)Add unit tests, both for this bug and for the preexisting but untested "original" feature.
I wanted JSDoc + TypeScript checks to help validate and document these changes, but that exposed apparent limitations of Chart.js core's type definitions. I'll open a separate PR for those.