Permalink
Browse files

Added clientX, clientY for touch event

  • Loading branch information...
phoboslab committed Oct 7, 2012
1 parent b2ee7cf commit b3d9c31a1984ceb4f93864b23efc351d23c2af25
Showing with 6 additions and 2 deletions.
  1. +6 −2 ejecta.js
View
@@ -194,10 +194,14 @@ var publishTouchEvent = function( type, args ) {
touches.length = args.length/3;
for( var i = 0, j = 0; i < args.length; i+=3, j++ ) {
+ var x = args[i+1],
+ y = args[i+2];
touches[j] = {
identifier: args[i],
- pageX: args[i+1],
- pageY: args[i+2]
+ pageX: x,
+ pageY: y,
+ clientX: x,
+ clientY: y
};
}
document._publishEvent( type, touchEvent );

0 comments on commit b3d9c31

Please sign in to comment.