diff options
Diffstat (limited to 'assets/js/vendor/jquery.ui.touch-punch.min.js')
-rw-r--r-- | assets/js/vendor/jquery.ui.touch-punch.min.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/assets/js/vendor/jquery.ui.touch-punch.min.js b/assets/js/vendor/jquery.ui.touch-punch.min.js new file mode 100644 index 00000000..d538812f --- /dev/null +++ b/assets/js/vendor/jquery.ui.touch-punch.min.js @@ -0,0 +1,3 @@ +(function(b){function c(a,b){if(!(1<a.originalEvent.touches.length)){a.preventDefault();var c=a.originalEvent.changedTouches[0],d=document.createEvent("MouseEvents");d.initMouseEvent(b,!0,!0,window,1,c.screenX,c.screenY,c.clientX,c.clientY,!1,!1,!1,!1,0,null);a.target.dispatchEvent(d)}}var f=!1,g,h;b.support.touch="ontouchend"in document;b.support.mspointer=window.navigator.msPointerEnabled;if(b.support.touch||b.support.mspointer){var d=b.ui.mouse.prototype,k=d._mouseInit,l=d._mouseDestroy,e;d._touchStart= +function(a){!e&&this._mouseCapture(a.originalEvent.changedTouches[0])&&(e=!0,f=!1,g=+new Date,c(a,"mouseover"),c(a,"mousemove"),c(a,"mousedown"))};d._touchMove=function(a){e&&(f=!0,c(a,"mousemove"))};d._touchEnd=function(a){e&&(h=+new Date,c(a,"mouseup"),c(a,"mouseout"),(!f||300>h-g)&&c(a,"click"),e=!1)};d._mouseInit=function(){b.support.mspointer&&(this.element[0].style.msTouchAction="none");this.element.bind({touchstart:b.proxy(this,"_touchStart"),touchmove:b.proxy(this,"_touchMove"),touchend:b.proxy(this, +"_touchEnd")});k.call(this)};d._mouseDestroy=function(){this.element.unbind({touchstart:b.proxy(this,"_touchStart"),touchmove:b.proxy(this,"_touchMove"),touchend:b.proxy(this,"_touchEnd")});l.call(this)}}})(jQuery); |