Geeks With Blogs

News profile for Aligned at Stack Overflow, Q&A for professional and enthusiast programmers

Donate Bitcoins

Check out Elapser from T3rse!
"free in Christ Jesus from the law of sin and death." Romans 8:2 (ESV) Check out the Falling Plates video on YouTube.
more about the Gospel
And then listen to Francis Chan speaking at LifeLight in SD.

Programming and Learning from SD

Our team was using hammer.js for touch events, mainly the tap event, but found some limitations in how we are using it. A colleague investigated more and decided we should use the Pointer Event Specification and Touch Event Specification contributed by Microsoft. It’s only in  Candidate recommendation and only supported in IE10 and 11 (on 1/9/2014), but there is a polyfill for that called Hand.js.

“Pointer events offer a way to unify handling mouse, touch, and pen input.  This means that we can add a single event listener to an element (e.g. pointerup) that will handle different input types without the delay that exists when using a mouse event binding (e.g. click – mousedown and then mouseup at the same position)” ~ my colleague with his permission

He added a Knockout custom binding to handle the element.addEventListener(“pointerdown” and “pointerup” instead of mouseDown or tap from Hamnmer.

 

It’s working well so far.

Posted on Thursday, January 9, 2014 3:38 PM JavaScript | Back to top


Comments on this post: Pointer Event W3C Specification

No comments posted yet.
Your comment:
 (will show your gravatar)
 


Copyright © Aligned | Powered by: GeeksWithBlogs.net | Join free