event-touch-debug.js revision 76ca635d61eb3f9fb7c9d788a44fa8b1690aa138
/**
* Adds touch event facade normalization properties (touches, changedTouches, targetTouches etc.) to the DOM event facade
*
* @module event-touch
*/
var SCALE = "scale",
ROTATION = "rotation",
IDENTIFIER = "identifier";
/**
* Adds touch event facade normalization properties to the DOM event facade
*
* @method _touch
* @for DOMEventFacade
* @private
* @param ev {Event} the DOM event
* @param currentTarget {HTMLElement} the element the listener was attached to
* @param wrapper {Event.Custom} the custom event wrapper for this DOM event
*/
Y.log("Calling facade._touch() with e = " + e);
if (e.touches) {
Y.log("Found e.touches. Replicating on facade");
this.touches = [];
touchCache = {};
}
}
if (e.targetTouches) {
Y.log("Found e.targetTouches. Replicating on facade");
this.targetTouches = [];
et = e.targetTouches[i];
}
}
if (e.changedTouches) {
Y.log("Found e.changedTouches. Replicating on facade");
this.changedTouches = [];
et = e.changedTouches[i];
}
}
if (SCALE in e) {
}
if (ROTATION in e) {
}
if (IDENTIFIER in e) {
this[IDENTIFIER] = e[IDENTIFIER];
}
};
if (Y.Node.DOM_EVENTS) {
touchstart:1,
touchmove:1,
touchend:1,
touchcancel:1,
gesturestart:1,
});
}