MDL-32843 import YUI 3.5.1
[moodle.git] / lib / yui / 3.5.1 / build / event-touch / event-touch-min.js
blobea2f76c2d939e975ffb5110b0b2d7b63620b81dc
1 /*
2 YUI 3.5.1 (build 22)
3 Copyright 2012 Yahoo! Inc. All rights reserved.
4 Licensed under the BSD License.
5 http://yuilibrary.com/license/
6 */
7 YUI.add("event-touch",function(d){var c="scale",a="rotation",b="identifier";d.DOMEventFacade.prototype._touch=function(n,m,o){var g,f,h,k,j;if(n.touches){this.touches=[];j={};for(g=0,f=n.touches.length;g<f;++g){k=n.touches[g];j[d.stamp(k)]=this.touches[g]=new d.DOMEventFacade(k,m,o);}}if(n.targetTouches){this.targetTouches=[];for(g=0,f=n.targetTouches.length;g<f;++g){k=n.targetTouches[g];h=j&&j[d.stamp(k,true)];this.targetTouches[g]=h||new d.DOMEventFacade(k,m,o);}}if(n.changedTouches){this.changedTouches=[];for(g=0,f=n.changedTouches.length;g<f;++g){k=n.changedTouches[g];h=j&&j[d.stamp(k,true)];this.changedTouches[g]=h||new d.DOMEventFacade(k,m,o);}}if(c in n){this[c]=n[c];}if(a in n){this[a]=n[a];}if(b in n){this[b]=n[b];}};if(d.Node.DOM_EVENTS){d.mix(d.Node.DOM_EVENTS,{touchstart:1,touchmove:1,touchend:1,touchcancel:1,gesturestart:1,gesturechange:1,gestureend:1});}},"3.5.1",{requires:["node-base"]});