event-facade-dom-touch.js revision 0e232b16e640a3801393ca223d42fd1e0e9e83c3
/**
* 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,
});
}