[whatwg] Hit regions and events
cabanier at gmail.com
Tue Mar 4 20:59:42 PST 2014
On Tue, Mar 4, 2014 at 8:30 PM, Ian Hickson <ian at hixie.ch> wrote:
> On Tue, 4 Mar 2014, Rik Cabanier wrote:
> > >
> > > So what would you do in the case where you start two touches on
> > > different regions, then move them at the same time to two other
> > > different regions at the same time? What would you put in the
> > > touchmove event's object?
The touches attribute  of the touch event would contain 2 touch elements.
Each touch element would have as target the canvas element and contain the
id of the hit region.
As you move, the touch elements would update their id as you enter other
Basically, everything is the same, except you hit test each touch and if
there's a hit, fill in the id.
> > This is not all that different from how the mouse events work with hit
> > regions.
> It's different in the important sense that there's only one mouse pointer,
> but there can be multiple ongoing touches.
Each touch acts conceptually like a mouse pointer.
More information about the whatwg