summaryrefslogtreecommitdiff
path: root/assets/js/vendor/jquery.ui.touch-punch.min.js
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2015-08-29 11:57:09 -0400
committerFrederic Guillot <fred@kanboard.net>2015-08-29 11:57:09 -0400
commit720d1bc3bd8688b56079ccda490ad0a11acc33e7 (patch)
treed83b57f40c41e6bcbd58a4423f3dc4184f012a17 /assets/js/vendor/jquery.ui.touch-punch.min.js
parentf4c3ca999145ad7a9428cbadd609fad7d02df2c1 (diff)
Add delay of 1.5s for draggable items on touch devices
Diffstat (limited to 'assets/js/vendor/jquery.ui.touch-punch.min.js')
-rw-r--r--assets/js/vendor/jquery.ui.touch-punch.min.js11
1 files changed, 11 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..31272ce6
--- /dev/null
+++ b/assets/js/vendor/jquery.ui.touch-punch.min.js
@@ -0,0 +1,11 @@
+/*!
+ * jQuery UI Touch Punch 0.2.3
+ *
+ * Copyright 2011–2014, Dave Furfero
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ *
+ * Depends:
+ * jquery.ui.widget.js
+ * jquery.ui.mouse.js
+ */
+!function(a){function f(a,b){if(!(a.originalEvent.touches.length>1)){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)}}if(a.support.touch="ontouchend"in document,a.support.touch){var e,b=a.ui.mouse.prototype,c=b._mouseInit,d=b._mouseDestroy;b._touchStart=function(a){var b=this;!e&&b._mouseCapture(a.originalEvent.changedTouches[0])&&(e=!0,b._touchMoved=!1,f(a,"mouseover"),f(a,"mousemove"),f(a,"mousedown"))},b._touchMove=function(a){e&&(this._touchMoved=!0,f(a,"mousemove"))},b._touchEnd=function(a){e&&(f(a,"mouseup"),f(a,"mouseout"),this._touchMoved||f(a,"click"),e=!1)},b._mouseInit=function(){var b=this;b.element.bind({touchstart:a.proxy(b,"_touchStart"),touchmove:a.proxy(b,"_touchMove"),touchend:a.proxy(b,"_touchEnd")}),c.call(b)},b._mouseDestroy=function(){var b=this;b.element.unbind({touchstart:a.proxy(b,"_touchStart"),touchmove:a.proxy(b,"_touchMove"),touchend:a.proxy(b,"_touchEnd")}),d.call(b)}}}(jQuery); \ No newline at end of file