-
Notifications
You must be signed in to change notification settings - Fork 327
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multi-axis zoom and original zoom limits #524
Conversation
Had a quick look, looks good. The .gitignore changes should be split off, if those are needed at all. Not a fan of passing the state around that much (actually just the number of args), but I think its better than getting the state everywhere. |
Something is broken:
|
This should fix test failures.
Thanks. I fixed the test failure. I wasn't a big fan of the number of parameters, either, but I didn't see a clean way of reducing it. I noticed that the module exports zoomFunctions and panFunctions, so that third-party custom scale classes can register specialized handling for zoom and pan (#169). This PR would change the function signature of those functions, which would be a SemVer breaking change. Should I move the chartState parameter to the end of each of the zoomFunctions and panFunctions to avoid this? Or, since the issue is still open and the feature is not yet documented, is it okay to make changes? |
Good catch the breaking change on Maybe the extra parameters should be avoided at least on those functions, as the |
This lets us keep the `zoomFunctions` and `panFunctions` signatures unchanged, since they're part of the public API.
Thanks for the feedback. If I avoid the extra parameter for So it's probably still a bit cleaner to call |
I'd be ok having it done in this pr, if you are willing to do it ;) |
As discussed in code review, it seems cleaner to consistently get state at the start of a function then pass it to `storeOriginalScaleLimits`.
@kurkle Done. Thanks. |
This fixes #522 and #523. I put it together for my own use, so everything's in one branch, but I'm happy to submit as smaller PRs for discussion and review whenever someone's ready to take a look at it.
Thank you.