Re: Wheel events

On Sat, Dec 6, 2008 at 1:32 AM, Travis Leithead
<Travis.Leithead@microsoft.com> wrote:
> It's a wheel. The user rolls it.

Not necessarily. On Apple Macbooks, wheel events are sent by moving
your fingers over the touchpad.

> Note, that such an
> approach effectively limits the usefulness of the actual value of rotation
> reported;

Right.

> and the actions of the web apps are generally driven by
> the number of events received, not necessarily by the "amount" of rotation,

That's true, unfortunately, and I think it's a problem we should solve
with the new events.

Let's have another look at the Macbook touchpad. This device reports
wheel events with a very high precision - pixel precision, to be
precise. Usually, scrolling about 15 pixels (or "touchpad ticks") is
equivalent to scrolling one line.

Now let's say we use degrees as the unit for the delta. My Logitech
mouse has 24 ticks per 360вк wheel rotation, so one tick would be
translated to 15 degrees. Then we can translate 1 touchpad pixel
scroll to 1 degree.

How would this affect web applications?

If the web app looks at the event's delta, everything's fine.
If the web application does not look at the delta, the result would be
that touchpad scrolling is 15 times faster than mousewheel scrolling.
That's not good.

And there's another problem: What about things that can't be scrolled
with arbitrary precision?
This is the problem that Olli referred to here:

On Wed, Oct 1, 2008 at 12:45 PM, Olli Pettay <Olli.Pettay@helsinki.fi> wrote:
> Dispatching only pixel scroll events wouldn't work because many applications
> don't want to handle small scrolling and there isn't always a good way to
> convert pixel scroll data to line scroll data.

That's why we wanted to give web apps a way to get the delta at
different precisions.

I hope I could make the background for the complexity a little clearer.

Markus

Received on Saturday, 6 December 2008 13:17:18 UTC