-
Notifications
You must be signed in to change notification settings - Fork 329
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
Fix indexScale pan/zoom proportion #151 #152
Conversation
Plus stop zooming on indexScale when panning.
Is this plugin officially abandonware? |
@subogero sorry for the long delay in reviewing. This PR will need to be rebased against master |
newMin = scale.getValueForPixel(scale.getPixelForValue(start) - delta); | ||
newMax = scale.getValueForPixel(scale.getPixelForValue(end) - delta); | ||
|
||
// Dont scale if either limit is reached |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dont -> Don't
|
||
zoomNS.panCumulativeDelta += delta; | ||
var dIndex = scale.getValueForPixel(Math.abs(delta)) - scale.getValueForPixel(0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is dIndex
short for deltaIndex
? If so, I'd prefer that as a variable name to be a bit clearer
if (tickOpts.reverse) { | ||
tickOpts.max = scale.getValueForPixel(scale.getPixelForValue(start) - delta); | ||
tickOpts.min = scale.getValueForPixel(scale.getPixelForValue(end) - delta); | ||
var rangeMin, rangeMax |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like maybe we can replace the logic from here down with a call to rangeMinLimiter
and rangeMaxLimiter
?
@subogero thanks for this PR. And sorry again for the delay in reviewing. I'm trying to get all the pending PRs merged. I know it's been awhile. If you could let me know if you're still interested in this PR or not that would be helpful, so that I know whether to wait to cut a release to include this one. Thanks again |
@subogero just checking in on this to see if you're still interested in pursuing. Sorry again for the long wait |
@subogero just a reminder that this PR will need to be rebased. Are you still interested in getting it in? |
Needs a rebase. The proportion part was already merged, but the stop zooming part would still be valid fix. |
Closing as everything in this has already been implemented |
Plus stop zooming on indexScale when panning.