[pointerevents] Touch-action should distinguish between single- vs multi-finger panning

mustaqahmed has just created a new issue for 
https://github.com/w3c/pointerevents:

== Touch-action should distinguish between single- vs multi-finger 
panning ==
What happens when an app wants to handle two finger panning in JS but 
let the browser scroll the page?  I think the current definition of 
touch-actions is ambiguous, hence we have difference in 
implementations.

[Here is a demo](http://mustaqahmed.github.io/web/image-panning.html) 
that shows that a one-finger-browser-action plus two-finger-JS-action 
is possible in Edge but not in Chrome!  We think Chrome needs to match
 Edge ([bug](http://crbug.com/632525)). 

More importantly, the spec can do better by providing more granularity
 in touch-actions.

The spec currently covers "singer-finger pan" browser action 
unambiguously through <code>touch-action: pan*</code>, and we have 
<code>touch-action: pinch-zoom</code> both in Edge & in Chrome (still 
as experimental) to cover (two-finger) zoom action (see #29).  Clearly
 a two-finger-pan sits in-between a one-finger-pan and a pinch zoom: 
in terms the outcome (=scrolling) it is like a one-finger-pan but in 
terms of "user activity" it is like a pinch zoom (=needs 2 fingers).  
In Chrome "touch-action: pan-x pan-y" interprets a two-finger-pan as a
 one-finger-pan;  in Edge it is like a pinch zoom.

Perhaps an additional "attribute" in touch-action is good enough, 
something like
<code>touch-action: pan-x single-finger</code>
vs
<code>touch-action: pan-x multi-finger</code>.

Thoughts?

(To clarify, I am talking only about simultaneous two-fingers here. 
The "gesture transition" scenario---adding/removing a finger from an 
ongoing gesture---seems harder.)

Please view or discuss this issue at 
https://github.com/w3c/pointerevents/issues/159 using your GitHub 
account

Received on Friday, 9 December 2016 22:11:01 UTC