jsconf eu - tim park - pointing forward to pointer events

16
Pointing Forward Tim Park @timpark Microsoft

Upload: tim-park

Post on 27-May-2015

776 views

Category:

Business


1 download

DESCRIPTION

For 15 years we've been constrained by a event model on the web that assumes that a mouse is the only possible pointing device that an application could need. In this presentation I talk about how touch is becoming the dominant pointer in use on the web, some things we have learned about the best practices for this reality, and how Pointer Events will help us make the web applications truly touchable.

TRANSCRIPT

Page 1: JSConf EU - Tim Park - Pointing forward to Pointer Events

Pointing ForwardTim Park

@timpark

Microsoft

Page 2: JSConf EU - Tim Park - Pointing forward to Pointer Events
Page 3: JSConf EU - Tim Park - Pointing forward to Pointer Events

Some patterns stop working

Don’t

Use

It

Hover

Page 4: JSConf EU - Tim Park - Pointing forward to Pointer Events

Rethink target sizing

Page 5: JSConf EU - Tim Park - Pointing forward to Pointer Events

Rethink target positioning

Page 6: JSConf EU - Tim Park - Pointing forward to Pointer Events

Designing for touch

Interaction areas Reading areas

Page 7: JSConf EU - Tim Park - Pointing forward to Pointer Events
Page 8: JSConf EU - Tim Park - Pointing forward to Pointer Events

W3C Proposal: Pointer Events• http://www.w3.org/TR/pointerevents/• Joint Proposal with Mozilla• Goals• Unified model for multiple input types• Ability to identify different input types• Expose attributes to take advantage of input types

• Moved from First Public Working Draft to Candidate Recommendation in 5 months.

Page 9: JSConf EU - Tim Park - Pointing forward to Pointer Events

Pointer Events: An Evolutionmousedownmouseup

mousemovemouseovermouseoutmouseentermouseleave

pointerdownpointeruppointercancelpointermovepointeroverpointeroutpointerenterpointerleave

Page 10: JSConf EU - Tim Park - Pointing forward to Pointer Events

Pointer Events: Attributes

...beyond existing button, clientX, clientY in mouse events.

• width • height• pressure• tilt• pointerType• pointerId

Pointer Events expand the set of attributes available…

Page 11: JSConf EU - Tim Park - Pointing forward to Pointer Events

Attributes: width and heightPointing devices often have a real world physical contact size.

Page 12: JSConf EU - Tim Park - Pointing forward to Pointer Events

Attributes: pressure, tiltX, tiltYPressure and tilt enable rich, real world interactions.

Page 13: JSConf EU - Tim Park - Pointing forward to Pointer Events

Attributes: pointerType, pointerIdpointerType: Which type of pointing device.

pointerId: Which instance of a pointing device.

Page 14: JSConf EU - Tim Park - Pointing forward to Pointer Events

Demo: Pointer Events(Available at: http://github.com/timfpark/PointerPaint)

Page 15: JSConf EU - Tim Park - Pointing forward to Pointer Events

Pointer Events: Getting Started• IE10 has vendor prefixed support• IE11 has unprefixed support.• Chromium WebKit prototype at http://aka.ms/pointium

• Polyfills Available• Hand.js: http://handjs.codeplex.com• Points.js: http://github.com/Rich-Harris/Points

Page 16: JSConf EU - Tim Park - Pointing forward to Pointer Events

Thanks!Tim Park

@timpark

Microsoft