Skip to content
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 sensitivity not always being applied. #9005

Merged
merged 1 commit into from
Jul 14, 2016

Conversation

iclanzan
Copy link
Contributor

@iclanzan iclanzan commented Jul 9, 2016

Minor change to allow scroll sensitivity to be taken into account when options flipAxes or scrollYToX are being used.

@mention-bot
Copy link

@iclanzan, thanks for your PR! By analyzing the annotation information on this pull request, we identified @alexandrudima and @bpasero to be potential reviewers

@msftclas
Copy link

msftclas commented Jul 9, 2016

Hi @iclanzan, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!

This seems like a small (but important) contribution, so no Contribution License Agreement is required at this point. Real humans will now evaluate your PR.

TTYL, MSBOT;

@alexdima alexdima merged commit 055ebb4 into microsoft:master Jul 14, 2016
@alexdima
Copy link
Member

👍 Nice catch! Thank you for the contribution!

@alexdima alexdima added this to the July 2016 milestone Jul 14, 2016
@@ -240,12 +240,12 @@ export class ScrollableElement extends Widget {
let deltaX = e.deltaX * this._options.mouseWheelScrollSensitivity;

if (this._options.flipAxes) {
deltaY = e.deltaX;
deltaX = e.deltaY;
deltaY = deltaX;
Copy link
Contributor

@johnfn johnfn Aug 9, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry if I'm missing something, but how does this work?

deltaY = deltaX;
deltaX = deltaY;

will not actually swap the two variables, it will just assign them both to have the value of deltaX. Is that the desired behavior?

My guess is you'd want to use [deltaY, deltaX] = [deltaX, deltaY]

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are correct. Feel free to open a PR.

@github-actions github-actions bot locked and limited conversation to collaborators Mar 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants