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

Expose ticks in wheel events #17

Open
garykac opened this issue Oct 6, 2015 · 2 comments
Open

Expose ticks in wheel events #17

garykac opened this issue Oct 6, 2015 · 2 comments

Comments

@garykac
Copy link
Member

garykac commented Oct 6, 2015

Copied from W3C Bugzilla: https://www.w3.org/Bugs/Public/show_bug.cgi?id=23259

Gary Kacmarcik 2013-09-16 21:55:51 UTC

We should consider adding |ticks| to the wheel event.

There are many UX use cases where ticks are more appropriate than pixels, especially considering that pixel values vary from system-to-system (and can vary based on user preferences).

An example of when ticks are more appropriate is with a "digit-selector", a menu or a drop-down list. In each of these cases, a single tick should select the next element regardless of how many "pixels" are reported.

Issues:
What ticks value should be used for input devices that fake scrollwheel events (like a touchpad)? Options are to simply use 0 ticks for these devices, come up with a method for generating fake ticks.

Do we need x, y and z ticks?

Comment 1 Gary Kacmarcik 2013-10-23 13:53:26 UTC

Moving to UI Events

@RByers
Copy link

RByers commented Jun 3, 2016

There's a good discussion of the need for this on WICG, based around this use case.

Key question is: how should this API behave on continuous scrolling devices, and can we identify those devices reliably on all OSes? On Windows I think we'd just want ticks to accumulate for every WHEEL_DELTA amount of accumulated delta (see MSDN). But our experience suggests we may not be able to provide an API (like MacOS's hasPreciseScrollingDeltas) which reliably identifies the type of scrolling device on Windows.

/cc @dtapuska @ymalik @teddink

@IvanSanchez
Copy link

Related: Leaflet/Leaflet#4592, Leaflet/Leaflet#4538

The current implementations rely on accumulating pixel deltas and using WHEEL_DELTA as a threshold - the main problem being that WHEEL_DELTA is not consistent across browsers (it might depend on the browser vendor, user's configuration and viewport geometry).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants