Re: Several event types are too discrete to be useful for touchscreen input

On Nov 5, 2012, at 6:06 PM, Rick Byers <rbyers@chromium.org> wrote:
> On Mon, Nov 5, 2012 at 5:43 PM, James Craig <jcraig@apple.com> wrote:
>> On Nov 5, 2012, at 12:44 PM, Rick Byers <rbyers@chromium.org> wrote:
>> 
>>> Is there a good reason to prefer polar co-ordinates to cartesian co-ordinates?
>> 
>> Not really. A lot of times the particular language used when creating actions gets changed by the time it makes it into the spec. Some of the discussion was leading towards directional events, but when we decided that wouldn't be enough, polar coords was suggested. 
>> 
>>> If the goal is to enable apps to use these events instead of mousewheel, it would help in adoption to have the co-ordinate system be the same (and seems like most real use cases would end up having to convert to delta-X and delta-Y values anyway).
>> 
>> Sure that sounds reasonable, and as you note, probably easier on authors. 
>> 
> Great, thanks! 

Thinking about panrequest some more in the context of scrollrequest (in scroll views) or moverequest (e.g. an element on a layout canvas). 

There may be times when it is difficult for the UA to determine an x/y delta for more discrete events such as paging up or down. We could assume the offsetHeight or offsetWidth of the element, but I'm not sure that's a safe assumption. On scrollrequest, I'm leaning towards keeping the discrete enums, possibly with an optional x/y delta, or perhaps leaving the x/y delta variant as a separate wheel event. Cartesian deltas make sense for panning maps via panrequest, but probably don't cover enough for scrollrequest where you do have more discrete events like keypresses for home/end/pageup/pagedown/arrows/spacebar, in addition to the scrollwheel events.

Thoughts?
James

Received on Wednesday, 7 November 2012 22:53:47 UTC