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

Balance timeline zooming sensitivity between Firefox and Chrome #2788

Merged
merged 2 commits into from
Aug 7, 2017

Conversation

fbarl
Copy link
Contributor

@fbarl fbarl commented Aug 2, 2017

Resolves #2768.

If this will behave nicely, consider extending the same logic to #2787.

@fbarl fbarl self-assigned this Aug 2, 2017
@fbarl fbarl requested a review from rndstr August 2, 2017 16:49
@@ -1,5 +1,5 @@

// See https://github.com/d3/d3-zoom/blob/807f02c7a5fe496fbd08cc3417b62905a8ce95fa/src/zoom.js
export function defaultWheelDelta(ev) {
return ev.deltaY * (ev.deltaMode ? 120 : 1) * 0.002;
return ev.deltaY * (ev.deltaMode ? 15 : 1) * 0.0035;

This comment was marked as abuse.

This comment was marked as abuse.

@rndstr
Copy link
Contributor

rndstr commented Aug 3, 2017

This still has a large discrepancy in sensitivity between FF (lower) and Chromium (higher) for me.

A line-to-pixel ratio in the area of 35 puts it at about the same sensitivity. This would be roughly double what you suggest so maybe there is some fast-scrolling setting in effect for your env (https://stackoverflow.com/a/37474225 suggests that Windows uses 2x).

@fbarl
Copy link
Contributor Author

fbarl commented Aug 4, 2017

@rndstr After reading about this more, I came to conclusion that any attempt to balance the cross-browser sensitivity perfectly is futile because it will always depend on the platform and some special settings.

Although we seem to be using very similar browsers/environments, line-to-pixel ratio for you seems to be 35px while for me it's 15px. I changed it to 25px in the code and I'd say that if the real sensitivity on browsers will be +/- 50% from that value, that will still result in a good UX.

Copy link
Contributor

@rndstr rndstr left a comment

Choose a reason for hiding this comment

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

@fbarl that makes sense to me.

Maybe cross-check with @rade once deployed since there is the possibility that I'm an outlier with the ~35px. I do have unconventional settings atm due to hidpi/lodpi monitor combo that FF could pick up. Will revisit once that is gone.

@fbarl fbarl merged commit d8ffea4 into master Aug 7, 2017
@fbarl fbarl deleted the improve-firefox-zooming branch August 8, 2017 14:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants