diff --git a/demos/Excluded_children.html b/demos/Excluded_children.html index 26e92af..1cb7159 100755 --- a/demos/Excluded_children.html +++ b/demos/Excluded_children.html @@ -1,25 +1,25 @@ - + - + - + - + touchSwipe Fork me on GitHub
- + - +

property: excludedElements

If you want to exclude certain child elements from triggering swipes, you can simply add a .noSwipe class to the element. Then the element and any of its children will no longer trigger the swipe. -

Also, a jQuery selector is used to exclude input elements as well as the .noSwipe elements. By default all button, input, select, textarea and a elements are excluded. - So either add a .noSwipe class the element, or set your own selector in the excludedElements property. +

Also, a jQuery selector is used to exclude input elements as well as the .noSwipe elements. + So either add a .noSwipe class the element, or set your own selector in the excludedElements property. Setting your own selector will remove the .noSwipe selector.


-	
+
 			
-			
+
 			
+
Swipe me, the child elements will not trigger swipes by default

+ I open a new tab if clicked, but im swipeable
- - - -
- + + + + +

Im am NOT swipeable because my class is .noSwipe

- +
- - + +
Swipe me, the child elements will not trigger swipes as they have been explicitly excluded

-
- - - -
-

Im am NOT swipeable because my im added to the excludedElements array

- +
diff --git a/demos/Tap_vs_swipe.html b/demos/Tap_vs_swipe.html index 1b3d0da..b7ded8e 100755 --- a/demos/Tap_vs_swipe.html +++ b/demos/Tap_vs_swipe.html @@ -1,28 +1,28 @@ - + - + - + - + - + touchSwipe Fork me on GitHub
- + - +

events: tap, doubleTap, longTap, swipe

properties: longTapThreshold, doubleTapThreshold

@@ -75,27 +79,28 @@

properties: longTapThreshold, do

If you use the jquery.ui.ipad.js plugin (http://code.google.com/p/jquery-ui-for-ipad-and-iphone/) you can then also pickup standard jQuery mouse events on children of the touchSwipe object.

- +

You can set the delay between taps which defines a double tap, and the length of a long tap with the doubleTapThreshold and longTapThreshold properties.

- -

Note: If you assign both tap and double tap, you tap events will be delayed by the length of doubleTapThreshold as it waits to see if its a double before trigger the event

- -

tap replaces the old click handler for naming consistency. Since the introduction of event - triggering as well as callbacks, the plugin cannot trigger a click event as it clashes with the jQ click event, + +

Note: If you assign both tap and double tap, you tap events will be delayed by the length of doubleTapThreshold as it waits to see if its a double before trigger the event

+ +

tap replaces the old click handler for naming consistency. Since the introduction of event + triggering as well as callbacks, the plugin cannot trigger a click event as it clashes with the jQ click event, so both the event and callback are called tap. For backwards compatibility, the click callback will still work but there is no click event. You must use the tap event when binding with on or bind

- - + +

 			
-			
+
 			
+ google
Swipe, Tap, Double Tap or Long Tap me

Im just a child div

Im a child div with my own jQuery click handler

- +

diff --git a/docs/$.fn.html b/docs/$.fn.html index a9da383..89ecf54 100644 --- a/docs/$.fn.html +++ b/docs/$.fn.html @@ -73,7 +73,7 @@

new fnSource:
@@ -179,7 +179,7 @@

Classes


- Documentation generated by JSDoc 3.4.0 on Wed Apr 27 2016 13:29:55 GMT+0100 (BST) using the docdash theme. + Documentation generated by JSDoc 3.4.0 on Fri Apr 29 2016 17:53:20 GMT+0100 (BST) using the docdash theme.
diff --git a/docs/$.fn.swipe.defaults.html b/docs/$.fn.swipe.defaults.html index 03c5e3a..f773b9d 100644 --- a/docs/$.fn.swipe.defaults.html +++ b/docs/$.fn.swipe.defaults.html @@ -59,7 +59,7 @@

Source:
@@ -1074,12 +1074,12 @@

Properties:
- "button, input, select, textarea, a, .noSwipe" + ".noSwipe" - A jquery selector that specifies child elements that do NOT trigger swipes. By default this excludes all form, input, select, button, anchor and .noSwipe elements. + A jquery selector that specifies child elements that do NOT trigger swipes. By default this excludes elements with the class .noSwipe . @@ -1165,7 +1165,7 @@
Properties:

- Documentation generated by JSDoc 3.4.0 on Wed Apr 27 2016 13:29:55 GMT+0100 (BST) using the docdash theme. + Documentation generated by JSDoc 3.4.0 on Fri Apr 29 2016 17:53:20 GMT+0100 (BST) using the docdash theme.
diff --git a/docs/$.fn.swipe.directions.html b/docs/$.fn.swipe.directions.html index 905a7b4..d8000f9 100644 --- a/docs/$.fn.swipe.directions.html +++ b/docs/$.fn.swipe.directions.html @@ -59,7 +59,7 @@

Source:
@@ -302,7 +302,7 @@

Properties:

- Documentation generated by JSDoc 3.4.0 on Wed Apr 27 2016 13:29:55 GMT+0100 (BST) using the docdash theme. + Documentation generated by JSDoc 3.4.0 on Fri Apr 29 2016 17:53:20 GMT+0100 (BST) using the docdash theme.
diff --git a/docs/$.fn.swipe.fingers.html b/docs/$.fn.swipe.fingers.html index 79e0b42..b2593c0 100644 --- a/docs/$.fn.swipe.fingers.html +++ b/docs/$.fn.swipe.fingers.html @@ -59,7 +59,7 @@

Source:
@@ -310,7 +310,7 @@

Properties:

- Documentation generated by JSDoc 3.4.0 on Wed Apr 27 2016 13:29:55 GMT+0100 (BST) using the docdash theme. + Documentation generated by JSDoc 3.4.0 on Fri Apr 29 2016 17:53:20 GMT+0100 (BST) using the docdash theme.
diff --git a/docs/$.fn.swipe.html b/docs/$.fn.swipe.html index d292cb1..0645ca0 100644 --- a/docs/$.fn.swipe.html +++ b/docs/$.fn.swipe.html @@ -68,7 +68,7 @@

new swipeSource:
@@ -245,7 +245,7 @@

(static, readonly) <
Source:
@@ -318,7 +318,7 @@

destroySource:
@@ -407,7 +407,7 @@

disableSource:
@@ -518,7 +518,7 @@

enableSource:
@@ -629,7 +629,7 @@

optionSource:
@@ -855,7 +855,7 @@

click

Source:
@@ -1021,7 +1021,7 @@

doubleTap

Source:
@@ -1192,7 +1192,7 @@

hold

Source:
@@ -1361,7 +1361,7 @@

longTap

Source:
@@ -1530,7 +1530,7 @@

pinchIn

Source:
@@ -1806,7 +1806,7 @@

pinchOut

Source:
@@ -2082,7 +2082,7 @@

pinchStatus

Source:
@@ -2358,7 +2358,7 @@

swipe

Source:
@@ -2634,7 +2634,7 @@

swipeDown

Source:
@@ -2910,7 +2910,7 @@

swipeLeft

Source:
@@ -3186,7 +3186,7 @@

swipeRight

Source:
@@ -3462,7 +3462,7 @@

swipeStatus

Source:
@@ -3762,7 +3762,7 @@

swipeUp

Source:
@@ -4038,7 +4038,7 @@

tap

Source:
@@ -4196,7 +4196,7 @@
Parameters:

- Documentation generated by JSDoc 3.4.0 on Wed Apr 27 2016 13:29:55 GMT+0100 (BST) using the docdash theme. + Documentation generated by JSDoc 3.4.0 on Fri Apr 29 2016 17:53:20 GMT+0100 (BST) using the docdash theme.
diff --git a/docs/$.fn.swipe.pageScroll.html b/docs/$.fn.swipe.pageScroll.html index eb1b555..13df666 100644 --- a/docs/$.fn.swipe.pageScroll.html +++ b/docs/$.fn.swipe.pageScroll.html @@ -59,7 +59,7 @@

Source:
@@ -263,7 +263,7 @@

Properties:

- Documentation generated by JSDoc 3.4.0 on Wed Apr 27 2016 13:29:55 GMT+0100 (BST) using the docdash theme. + Documentation generated by JSDoc 3.4.0 on Fri Apr 29 2016 17:53:20 GMT+0100 (BST) using the docdash theme.
diff --git a/docs/$.fn.swipe.phases.html b/docs/$.fn.swipe.phases.html index a0852d4..c020141 100644 --- a/docs/$.fn.swipe.phases.html +++ b/docs/$.fn.swipe.phases.html @@ -59,7 +59,7 @@

Source:
@@ -256,7 +256,7 @@

Properties:

- Documentation generated by JSDoc 3.4.0 on Wed Apr 27 2016 13:29:55 GMT+0100 (BST) using the docdash theme. + Documentation generated by JSDoc 3.4.0 on Fri Apr 29 2016 17:53:20 GMT+0100 (BST) using the docdash theme.
diff --git a/docs/$.html b/docs/$.html index 9435174..dcecd7a 100644 --- a/docs/$.html +++ b/docs/$.html @@ -71,7 +71,7 @@

new $Source:
@@ -177,7 +177,7 @@

Classes


- Documentation generated by JSDoc 3.4.0 on Wed Apr 27 2016 13:29:55 GMT+0100 (BST) using the docdash theme. + Documentation generated by JSDoc 3.4.0 on Fri Apr 29 2016 17:53:20 GMT+0100 (BST) using the docdash theme.
diff --git a/docs/index.html b/docs/index.html index 4da507e..f657fcd 100644 --- a/docs/index.html +++ b/docs/index.html @@ -92,7 +92,7 @@

Development

Install dependencies


- Documentation generated by JSDoc 3.4.0 on Wed Apr 27 2016 13:29:55 GMT+0100 (BST) using the docdash theme. + Documentation generated by JSDoc 3.4.0 on Fri Apr 29 2016 17:53:20 GMT+0100 (BST) using the docdash theme.
diff --git a/docs/jquery.touchSwipe.js.html b/docs/jquery.touchSwipe.js.html index d143372..84b1359 100644 --- a/docs/jquery.touchSwipe.js.html +++ b/docs/jquery.touchSwipe.js.html @@ -40,7 +40,7 @@

jquery.touchSwipe.js

/*!
  * @fileOverview TouchSwipe - jQuery Plugin
- * @version 1.6.15
+ * @version 1.6.16
  *
  * @author Matt Bryson http://www.github.com/mattbryson
  * @see https://github.com/mattbryson/TouchSwipe-Jquery-Plugin
@@ -101,7 +101,7 @@ 

jquery.touchSwipe.js

* $version: 1.4.0 - Added pinch support, pinchIn and pinchOut * * $Date: 2012-11-10 (Thurs, 11 Oct 2012) $ - * $version: 1.5.0 - Added excludedElements, a jquery selector that specifies child elements that do NOT trigger swipes. By default, this is one select that removes all form, input select, button and anchor elements. + * $version: 1.5.0 - Added excludedElements, a jquery selector that specifies child elements that do NOT trigger swipes. By default, this is .noSwipe * * $Date: 2012-22-10 (Mon, 22 Oct 2012) $ * $version: 1.5.1 - Fixed bug with jQuery 1.8 and trailing comma in excludedElements @@ -160,6 +160,10 @@

jquery.touchSwipe.js

* - Fixed #267 allowPageScroll not working correctly * $version 1.6.14 - Fixed #220 / #248 doubletap not firing with swipes, #223 commonJS compatible * $version 1.6.15 - More bug fixes + * + * $Date: 2016-04-29 (Fri, 29 April 2016) $ + * $version 1.6.16 - Swipes with 0 distance now allow default events to trigger. So tapping any form elements or A tags will allow default interaction, but swiping will trigger a swipe. + Removed the a, input, select etc from the excluded Children list as the 0 distance tap solves that issue. */ /** @@ -269,7 +273,7 @@

jquery.touchSwipe.js

<code>"horizontal"</code> : will force page to scroll on horizontal swipes. <br/> <code>"vertical"</code> : will force page to scroll on vertical swipes. <br/> * @property {boolean} [fallbackToMouseEvents=true] If true mouse events are used when run on a non touch device, false will stop swipes being triggered by mouse events on non tocuh devices. - * @property {string} [excludedElements="button, input, select, textarea, a, .noSwipe"] A jquery selector that specifies child elements that do NOT trigger swipes. By default this excludes all form, input, select, button, anchor and .noSwipe elements. + * @property {string} [excludedElements=".noSwipe"] A jquery selector that specifies child elements that do NOT trigger swipes. By default this excludes elements with the class .noSwipe . * @property {boolean} [preventDefaultEvents=true] by default default events are cancelled, so the page doesn't move. You can dissable this so both native events fire as well as your handlers. */ @@ -300,7 +304,7 @@

jquery.touchSwipe.js

triggerOnTouchLeave: false, allowPageScroll: "auto", fallbackToMouseEvents: true, - excludedElements: "label, button, input, select, textarea, a, .noSwipe", + excludedElements: ".noSwipe", preventDefaultEvents: true }; @@ -2145,7 +2149,7 @@

jquery.touchSwipe.js


- Documentation generated by JSDoc 3.4.0 on Wed Apr 27 2016 13:29:55 GMT+0100 (BST) using the docdash theme. + Documentation generated by JSDoc 3.4.0 on Fri Apr 29 2016 17:53:20 GMT+0100 (BST) using the docdash theme.
diff --git a/docs/tutorial-Any_finger_swipe.html b/docs/tutorial-Any_finger_swipe.html index a5f99eb..481763c 100644 --- a/docs/tutorial-Any_finger_swipe.html +++ b/docs/tutorial-Any_finger_swipe.html @@ -99,7 +99,7 @@

properties: fingers


- Documentation generated by JSDoc 3.4.0 on Wed Apr 27 2016 13:29:55 GMT+0100 (BST) using the docdash theme. + Documentation generated by JSDoc 3.4.0 on Fri Apr 29 2016 17:53:20 GMT+0100 (BST) using the docdash theme.
diff --git a/docs/tutorial-Basic_swipe.html b/docs/tutorial-Basic_swipe.html index 4bca423..4b097ed 100644 --- a/docs/tutorial-Basic_swipe.html +++ b/docs/tutorial-Basic_swipe.html @@ -98,7 +98,7 @@

events: swipe,swipeLeft,
- Documentation generated by JSDoc 3.4.0 on Wed Apr 27 2016 13:29:55 GMT+0100 (BST) using the docdash theme. + Documentation generated by JSDoc 3.4.0 on Fri Apr 29 2016 17:53:20 GMT+0100 (BST) using the docdash theme.
diff --git a/docs/tutorial-Enable_and_destroy.html b/docs/tutorial-Enable_and_destroy.html index bdac086..953f816 100644 --- a/docs/tutorial-Enable_and_destroy.html +++ b/docs/tutorial-Enable_and_destroy.html @@ -145,7 +145,7 @@

methods: enable, disable,
- Documentation generated by JSDoc 3.4.0 on Wed Apr 27 2016 13:29:55 GMT+0100 (BST) using the docdash theme. + Documentation generated by JSDoc 3.4.0 on Fri Apr 29 2016 17:53:20 GMT+0100 (BST) using the docdash theme.
diff --git a/docs/tutorial-Excluded_children.html b/docs/tutorial-Excluded_children.html index dc7ff4b..1a5fd86 100644 --- a/docs/tutorial-Excluded_children.html +++ b/docs/tutorial-Excluded_children.html @@ -42,26 +42,26 @@

Excluded children

- + - + - + - + touchSwipe Fork me on GitHub
- + - +

property: excludedElements

If you want to exclude certain child elements from triggering swipes, you can simply add a .noSwipe class to the element. Then the element and any of its children will no longer trigger the swipe. -

Also, a jQuery selector is used to exclude input elements as well as the .noSwipe elements. By default all button, input, select, textarea and a elements are excluded. - So either add a .noSwipe class the element, or set your own selector in the excludedElements property. +

Also, a jQuery selector is used to exclude input elements as well as the .noSwipe elements. + So either add a .noSwipe class the element, or set your own selector in the excludedElements property. Setting your own selector will remove the .noSwipe selector.


-	
+
 			
-			
+
 			
+
Swipe me, the child elements will not trigger swipes by default

+ I open a new tab if clicked, but im swipeable
- - - -
- + + + + +

Im am NOT swipeable because my class is .noSwipe

- +
- - + +
Swipe me, the child elements will not trigger swipes as they have been explicitly excluded

-
- - - -
-

Im am NOT swipeable because my im added to the excludedElements array

- +
@@ -138,7 +132,7 @@

property: excludedElements


- Documentation generated by JSDoc 3.4.0 on Wed Apr 27 2016 13:29:55 GMT+0100 (BST) using the docdash theme. + Documentation generated by JSDoc 3.4.0 on Fri Apr 29 2016 17:53:20 GMT+0100 (BST) using the docdash theme.
diff --git a/docs/tutorial-Finger_swipe.html b/docs/tutorial-Finger_swipe.html index 071def0..81db625 100644 --- a/docs/tutorial-Finger_swipe.html +++ b/docs/tutorial-Finger_swipe.html @@ -111,7 +111,7 @@

property: fingers


- Documentation generated by JSDoc 3.4.0 on Wed Apr 27 2016 13:29:55 GMT+0100 (BST) using the docdash theme. + Documentation generated by JSDoc 3.4.0 on Fri Apr 29 2016 17:53:21 GMT+0100 (BST) using the docdash theme.
diff --git a/docs/tutorial-Handlers_and_events.html b/docs/tutorial-Handlers_and_events.html index 162195e..32307b1 100644 --- a/docs/tutorial-Handlers_and_events.html +++ b/docs/tutorial-Handlers_and_events.html @@ -178,7 +178,7 @@

events: tap hold swipe
- Documentation generated by JSDoc 3.4.0 on Wed Apr 27 2016 13:29:55 GMT+0100 (BST) using the docdash theme. + Documentation generated by JSDoc 3.4.0 on Fri Apr 29 2016 17:53:21 GMT+0100 (BST) using the docdash theme.
diff --git a/docs/tutorial-Hold.html b/docs/tutorial-Hold.html index d19b02f..4eca94e 100644 --- a/docs/tutorial-Hold.html +++ b/docs/tutorial-Hold.html @@ -111,7 +111,7 @@

properties: longTapThreshold
- Documentation generated by JSDoc 3.4.0 on Wed Apr 27 2016 13:29:55 GMT+0100 (BST) using the docdash theme. + Documentation generated by JSDoc 3.4.0 on Fri Apr 29 2016 17:53:21 GMT+0100 (BST) using the docdash theme.
diff --git a/docs/tutorial-Image_gallery_example.html b/docs/tutorial-Image_gallery_example.html index 2f49d20..8cba4a9 100644 --- a/docs/tutorial-Image_gallery_example.html +++ b/docs/tutorial-Image_gallery_example.html @@ -198,7 +198,7 @@

Image gallery example


- Documentation generated by JSDoc 3.4.0 on Wed Apr 27 2016 13:29:55 GMT+0100 (BST) using the docdash theme. + Documentation generated by JSDoc 3.4.0 on Fri Apr 29 2016 17:53:21 GMT+0100 (BST) using the docdash theme.
diff --git a/docs/tutorial-Options.html b/docs/tutorial-Options.html index 7557626..8500bb9 100644 --- a/docs/tutorial-Options.html +++ b/docs/tutorial-Options.html @@ -140,7 +140,7 @@

methods: option, swipe
- Documentation generated by JSDoc 3.4.0 on Wed Apr 27 2016 13:29:55 GMT+0100 (BST) using the docdash theme. + Documentation generated by JSDoc 3.4.0 on Fri Apr 29 2016 17:53:21 GMT+0100 (BST) using the docdash theme.
diff --git a/docs/tutorial-Page_scrolling.html b/docs/tutorial-Page_scrolling.html index 8cfc6af..730872f 100644 --- a/docs/tutorial-Page_scrolling.html +++ b/docs/tutorial-Page_scrolling.html @@ -159,7 +159,7 @@

property: allowPageScroll


- Documentation generated by JSDoc 3.4.0 on Wed Apr 27 2016 13:29:55 GMT+0100 (BST) using the docdash theme. + Documentation generated by JSDoc 3.4.0 on Fri Apr 29 2016 17:53:21 GMT+0100 (BST) using the docdash theme.
diff --git a/docs/tutorial-Page_zoom.html b/docs/tutorial-Page_zoom.html index 2e428c5..8b5e079 100644 --- a/docs/tutorial-Page_zoom.html +++ b/docs/tutorial-Page_zoom.html @@ -100,7 +100,7 @@

property: fingers


- Documentation generated by JSDoc 3.4.0 on Wed Apr 27 2016 13:29:55 GMT+0100 (BST) using the docdash theme. + Documentation generated by JSDoc 3.4.0 on Fri Apr 29 2016 17:53:21 GMT+0100 (BST) using the docdash theme.
diff --git a/docs/tutorial-Pinch.html b/docs/tutorial-Pinch.html index f5146d0..b221e1a 100644 --- a/docs/tutorial-Pinch.html +++ b/docs/tutorial-Pinch.html @@ -107,7 +107,7 @@

events: pinchIn, pinchOut
- Documentation generated by JSDoc 3.4.0 on Wed Apr 27 2016 13:29:56 GMT+0100 (BST) using the docdash theme. + Documentation generated by JSDoc 3.4.0 on Fri Apr 29 2016 17:53:21 GMT+0100 (BST) using the docdash theme.
diff --git a/docs/tutorial-Pinch_and_Swipe.html b/docs/tutorial-Pinch_and_Swipe.html index 02af738..14ef1ab 100644 --- a/docs/tutorial-Pinch_and_Swipe.html +++ b/docs/tutorial-Pinch_and_Swipe.html @@ -131,7 +131,7 @@

properties: pinchThreshold


- Documentation generated by JSDoc 3.4.0 on Wed Apr 27 2016 13:29:56 GMT+0100 (BST) using the docdash theme. + Documentation generated by JSDoc 3.4.0 on Fri Apr 29 2016 17:53:21 GMT+0100 (BST) using the docdash theme.
diff --git a/docs/tutorial-Pinch_status.html b/docs/tutorial-Pinch_status.html index 0232e63..2dcb45b 100644 --- a/docs/tutorial-Pinch_status.html +++ b/docs/tutorial-Pinch_status.html @@ -101,7 +101,7 @@

events: pinchStatus


- Documentation generated by JSDoc 3.4.0 on Wed Apr 27 2016 13:29:56 GMT+0100 (BST) using the docdash theme. + Documentation generated by JSDoc 3.4.0 on Fri Apr 29 2016 17:53:21 GMT+0100 (BST) using the docdash theme.
diff --git a/docs/tutorial-Single_swipe.html b/docs/tutorial-Single_swipe.html index bac511d..1748b59 100644 --- a/docs/tutorial-Single_swipe.html +++ b/docs/tutorial-Single_swipe.html @@ -101,7 +101,7 @@

events: swipeLeft, swipeRight
- Documentation generated by JSDoc 3.4.0 on Wed Apr 27 2016 13:29:56 GMT+0100 (BST) using the docdash theme. + Documentation generated by JSDoc 3.4.0 on Fri Apr 29 2016 17:53:21 GMT+0100 (BST) using the docdash theme.
diff --git a/docs/tutorial-Stop_propegation.html b/docs/tutorial-Stop_propegation.html index a6a48a7..7a9dfa6 100644 --- a/docs/tutorial-Stop_propegation.html +++ b/docs/tutorial-Stop_propegation.html @@ -107,7 +107,7 @@

events: swipeStatus


- Documentation generated by JSDoc 3.4.0 on Wed Apr 27 2016 13:29:56 GMT+0100 (BST) using the docdash theme. + Documentation generated by JSDoc 3.4.0 on Fri Apr 29 2016 17:53:21 GMT+0100 (BST) using the docdash theme.
diff --git a/docs/tutorial-Swipe_status.html b/docs/tutorial-Swipe_status.html index 892e4eb..3fab313 100644 --- a/docs/tutorial-Swipe_status.html +++ b/docs/tutorial-Swipe_status.html @@ -132,7 +132,7 @@

event: swipeStatus


- Documentation generated by JSDoc 3.4.0 on Wed Apr 27 2016 13:29:56 GMT+0100 (BST) using the docdash theme. + Documentation generated by JSDoc 3.4.0 on Fri Apr 29 2016 17:53:21 GMT+0100 (BST) using the docdash theme.
diff --git a/docs/tutorial-Tap_vs_swipe.html b/docs/tutorial-Tap_vs_swipe.html index 231fc99..1435e3a 100644 --- a/docs/tutorial-Tap_vs_swipe.html +++ b/docs/tutorial-Tap_vs_swipe.html @@ -42,29 +42,29 @@

Tap vs swipe

- + - + - + - + - + touchSwipe Fork me on GitHub
- + - +

events: tap, doubleTap, longTap, swipe

properties: longTapThreshold, doubleTapThreshold

@@ -117,27 +121,28 @@

properties: longTapThreshold, do

If you use the jquery.ui.ipad.js plugin (http://code.google.com/p/jquery-ui-for-ipad-and-iphone/) you can then also pickup standard jQuery mouse events on children of the touchSwipe object.

- +

You can set the delay between taps which defines a double tap, and the length of a long tap with the doubleTapThreshold and longTapThreshold properties.

- -

Note: If you assign both tap and double tap, you tap events will be delayed by the length of doubleTapThreshold as it waits to see if its a double before trigger the event

- -

tap replaces the old click handler for naming consistency. Since the introduction of event - triggering as well as callbacks, the plugin cannot trigger a click event as it clashes with the jQ click event, + +

Note: If you assign both tap and double tap, you tap events will be delayed by the length of doubleTapThreshold as it waits to see if its a double before trigger the event

+ +

tap replaces the old click handler for naming consistency. Since the introduction of event + triggering as well as callbacks, the plugin cannot trigger a click event as it clashes with the jQ click event, so both the event and callback are called tap. For backwards compatibility, the click callback will still work but there is no click event. You must use the tap event when binding with on or bind

- - + +

 			
-			
+
 			
+ google
Swipe, Tap, Double Tap or Long Tap me

Im just a child div

Im a child div with my own jQuery click handler

- +

@@ -152,7 +157,7 @@

properties: longTapThreshold, do
- Documentation generated by JSDoc 3.4.0 on Wed Apr 27 2016 13:29:56 GMT+0100 (BST) using the docdash theme. + Documentation generated by JSDoc 3.4.0 on Fri Apr 29 2016 17:53:21 GMT+0100 (BST) using the docdash theme.
diff --git a/docs/tutorial-Thresholds.html b/docs/tutorial-Thresholds.html index b8c4c72..ed46528 100644 --- a/docs/tutorial-Thresholds.html +++ b/docs/tutorial-Thresholds.html @@ -159,7 +159,7 @@

property: maxTimeThreshold


- Documentation generated by JSDoc 3.4.0 on Wed Apr 27 2016 13:29:56 GMT+0100 (BST) using the docdash theme. + Documentation generated by JSDoc 3.4.0 on Fri Apr 29 2016 17:53:21 GMT+0100 (BST) using the docdash theme.
diff --git a/docs/tutorial-Trigger_handlers.html b/docs/tutorial-Trigger_handlers.html index 33b3d16..79de654 100644 --- a/docs/tutorial-Trigger_handlers.html +++ b/docs/tutorial-Trigger_handlers.html @@ -208,7 +208,7 @@

properties: triggerOnTouchEnd, t
- Documentation generated by JSDoc 3.4.0 on Wed Apr 27 2016 13:29:56 GMT+0100 (BST) using the docdash theme. + Documentation generated by JSDoc 3.4.0 on Fri Apr 29 2016 17:53:21 GMT+0100 (BST) using the docdash theme.
diff --git a/docs/tutorial-index_.html b/docs/tutorial-index_.html index b649bc0..51dabdd 100644 --- a/docs/tutorial-index_.html +++ b/docs/tutorial-index_.html @@ -124,7 +124,7 @@

Demos


- Documentation generated by JSDoc 3.4.0 on Wed Apr 27 2016 13:29:56 GMT+0100 (BST) using the docdash theme. + Documentation generated by JSDoc 3.4.0 on Fri Apr 29 2016 17:53:21 GMT+0100 (BST) using the docdash theme.
diff --git a/jquery.touchSwipe.js b/jquery.touchSwipe.js index 0f80282..922f204 100644 --- a/jquery.touchSwipe.js +++ b/jquery.touchSwipe.js @@ -1,6 +1,6 @@ /*! * @fileOverview TouchSwipe - jQuery Plugin - * @version 1.6.15 + * @version 1.6.16 * * @author Matt Bryson http://www.github.com/mattbryson * @see https://github.com/mattbryson/TouchSwipe-Jquery-Plugin @@ -61,7 +61,7 @@ * $version: 1.4.0 - Added pinch support, pinchIn and pinchOut * * $Date: 2012-11-10 (Thurs, 11 Oct 2012) $ - * $version: 1.5.0 - Added excludedElements, a jquery selector that specifies child elements that do NOT trigger swipes. By default, this is one select that removes all form, input select, button and anchor elements. + * $version: 1.5.0 - Added excludedElements, a jquery selector that specifies child elements that do NOT trigger swipes. By default, this is .noSwipe * * $Date: 2012-22-10 (Mon, 22 Oct 2012) $ * $version: 1.5.1 - Fixed bug with jQuery 1.8 and trailing comma in excludedElements @@ -120,6 +120,10 @@ * - Fixed #267 allowPageScroll not working correctly * $version 1.6.14 - Fixed #220 / #248 doubletap not firing with swipes, #223 commonJS compatible * $version 1.6.15 - More bug fixes + * + * $Date: 2016-04-29 (Fri, 29 April 2016) $ + * $version 1.6.16 - Swipes with 0 distance now allow default events to trigger. So tapping any form elements or A tags will allow default interaction, but swiping will trigger a swipe. + Removed the a, input, select etc from the excluded Children list as the 0 distance tap solves that issue. */ /** @@ -229,7 +233,7 @@ "horizontal" : will force page to scroll on horizontal swipes.
"vertical" : will force page to scroll on vertical swipes.
* @property {boolean} [fallbackToMouseEvents=true] If true mouse events are used when run on a non touch device, false will stop swipes being triggered by mouse events on non tocuh devices. - * @property {string} [excludedElements="button, input, select, textarea, a, .noSwipe"] A jquery selector that specifies child elements that do NOT trigger swipes. By default this excludes all form, input, select, button, anchor and .noSwipe elements. + * @property {string} [excludedElements=".noSwipe"] A jquery selector that specifies child elements that do NOT trigger swipes. By default this excludes elements with the class .noSwipe . * @property {boolean} [preventDefaultEvents=true] by default default events are cancelled, so the page doesn't move. You can dissable this so both native events fire as well as your handlers. */ @@ -260,7 +264,7 @@ triggerOnTouchLeave: false, allowPageScroll: "auto", fallbackToMouseEvents: true, - excludedElements: "label, button, input, select, textarea, a, .noSwipe", + excludedElements: ".noSwipe", preventDefaultEvents: true }; diff --git a/jquery.touchSwipe.map b/jquery.touchSwipe.map deleted file mode 100644 index f0b1e6b..0000000 --- a/jquery.touchSwipe.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["jquery.touchSwipe.js"],"names":["factory","define","amd","jQuery","module","exports","require","$","init","options","undefined","allowPageScroll","swipe","swipeStatus","NONE","click","tap","extend","fn","defaults","this","each","$this","plugin","data","PLUGIN_NS","TouchSwipe","element","touchStart","jqEvent","getTouchInProgress","target","closest","excludedElements","$element","length","ret","event","originalEvent","touches","evt","phase","PHASE_START","fingerCount","preventDefaultEvents","preventDefault","distance","direction","currentDirection","pinchDirection","duration","startTouchesDistance","endTouchesDistance","pinchZoom","pinchDistance","maximumsMap","createMaximumsData","cancelMultiFingerRelease","createFingerData","fingers","ALL_FINGERS","hasPinches","startTime","getTimeStamp","calculateTouchesDistance","fingerData","start","pinchStatus","triggerHandler","PHASE_CANCEL","hold","holdTimeout","setTimeout","proxy","trigger","call","longTapThreshold","setTouchInProgress","touchMove","PHASE_END","inMultiFingerRelease","currentFinger","updateFingerData","endTime","clearTimeout","PHASE_MOVE","end","calculatePinchDirection","calculatePinchZoom","Math","abs","calculateDirection","last","validateDefaultEvent","calculateDistance","calculateDuration","setMaxDistance","triggerOnTouchEnd","triggerOnTouchLeave","inBounds","bounds","getbounds","isInBounds","getNextPhase","touchEnd","startMultiFingerRelease","fingerCountAtRelease","didSwipeBackToCancel","validateSwipeDistance","hasTap","triggerHandlerForGesture","TAP","touchCancel","touchLeave","removeListeners","unbind","START_EV","CANCEL_EV","MOVE_EV","END_EV","LEAVE_EV","currentPhase","nextPhase","validTime","validateSwipeTime","validDistance","didCancel","didSwipe","hasSwipes","SWIPE","didPinch","PINCH","didDoubleTap","DOUBLE_TAP","didLongTap","LONG_TAP","didTap","gesture","validateSwipe","singleTapTimeout","LEFT","swipeLeft","RIGHT","swipeRight","UP","swipeUp","DOWN","swipeDown","validatePinch","IN","pinchIn","OUT","pinchOut","hasDoubleTap","inDoubleTap","doubleTapStartTime","doubleTapThreshold","doubleTap","longTap","valid","threshold","cancelled","cancelThreshold","getMaxDistance","validatePinchDistance","pinchThreshold","result","maxTimeThreshold","auto","AUTO","HORIZONTAL","VERTICAL","hasCorrectFingerCount","validateFingers","hasEndPoint","validateEndPoint","hasCorrectDistance","hasValidTime","hasValidDistance","SUPPORTS_TOUCH","x","hasLongTap","validateDoubleTap","now","validateTap","isNaN","validateLongTap","DOUBLE_TAP_THRESHOLD","previousTouchEndTime","withinThreshold","diff","fingerReleaseThreshold","val","bind","id","f","y","pageX","clientX","pageY","clientY","identifier","getFingerData","max","maxData","createMaximumVO","dir","startPoint","endPoint","diffX","diffY","round","sqrt","startDistance","endDistance","percent","toFixed","pow","calculateAngle","r","atan2","angle","PI","comparePoints","Date","getTime","el","offset","left","right","outerWidth","top","bottom","outerHeight","point","pointA","pointB","useTouchEvents","SUPPORTS_POINTER","fallbackToMouseEvents","SUPPORTS_POINTER_IE10","e","error","enable","disable","destroy","option","property","value","VERSION","window","navigator","msPointerEnabled","pointerEnabled","method","apply","Array","prototype","slice","arguments","version","phases","directions","pageScroll","ONE","TWO","THREE","FOUR","FIVE","ALL"],"mappings":";;;;;;;;;;;;;CA8IC,SAASA,SACc,kBAAXC,SAAyBA,OAAOC,KAAOD,OAAOC,IAAIC,OAE3DF,QAAQ,UAAWD,SAGnBA,QAF2B,mBAAXI,SAA0BA,OAAOC,QAEzCC,QAAQ,UAGRH,SAEV,SAASI,GACT,YAyPA,SAASC,MAAKC,SAoBZ,OAlBIA,SAAwCC,SAA5BD,QAAQE,iBAAoDD,SAAlBD,QAAQG,OAA+CF,SAAxBD,QAAQI,cAC/FJ,QAAQE,gBAAkBG,MAKNJ,SAAlBD,QAAQM,OAAuCL,SAAhBD,QAAQO,MACzCP,QAAQO,IAAMP,QAAQM,OAGnBN,UACHA,YAIFA,QAAUF,EAAEU,UAAWV,EAAEW,GAAGN,MAAMO,SAAUV,SAGrCW,KAAKC,KAAK,WACf,GAAIC,OAAQf,EAAEa,MAGVG,OAASD,MAAME,KAAKC,UAEnBF,UACHA,OAAS,GAAIG,YAAWN,KAAMX,SAC9Ba,MAAME,KAAKC,UAAWF,WAgB5B,QAASG,YAAWC,QAASlB,SAwJ3B,QAASmB,YAAWC,SAGlB,KAAIC,sBAKAvB,EAAEsB,QAAQE,QAAQC,QAAQvB,QAAQwB,iBAAkBC,UAAUC,OAAS,GAA3E,CAMA,GAEIC,KAFAC,MAAQR,QAAQS,cAAgBT,QAAQS,cAAgBT,QAG1DU,QAAUF,MAAME,QAChBC,IAAMD,QAAUA,QAAQ,GAAKF,KAmD/B,OAjDAI,OAAQC,YAGJH,QAEFI,YAAcJ,QAAQJ,OAGf1B,QAAQmC,wBAAyB,GACxCf,QAAQgB,iBAIVC,SAAW,EACXC,UAAY,KACZC,iBAAiB,KACjBC,eAAiB,KACjBC,SAAW,EACXC,qBAAuB,EACvBC,mBAAqB,EACrBC,UAAY,EACZC,cAAgB,EA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,WAAYA,WACZC,SAAUA,SACVF,KAAMA,MAiBRlK,EAAEW,GAAGN,MAAM+C,SACT6M,IAAK,EACLC,IAAK,EACLC,MAAO,EACPC,KAAM,EACNC,KAAM,EACNC,IAAKjN","file":"jquery.touchSwipe.min.js"} \ No newline at end of file diff --git a/jquery.touchSwipe.map.js b/jquery.touchSwipe.map.js deleted file mode 100644 index 4b18f35..0000000 --- a/jquery.touchSwipe.map.js +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["jquery.touchSwipe.js"],"names":["factory","define","amd","jQuery","module","exports","require","$","VERSION","LEFT","RIGHT","UP","DOWN","IN","OUT","NONE","AUTO","SWIPE","PINCH","TAP","DOUBLE_TAP","LONG_TAP","HOLD","HORIZONTAL","VERTICAL","ALL_FINGERS","DOUBLE_TAP_THRESHOLD","PHASE_START","PHASE_MOVE","PHASE_END","PHASE_CANCEL","SUPPORTS_TOUCH","window","SUPPORTS_POINTER_IE10","navigator","msPointerEnabled","pointerEnabled","SUPPORTS_POINTER","PLUGIN_NS","defaults","fingers","threshold","cancelThreshold","pinchThreshold","maxTimeThreshold","fingerReleaseThreshold","longTapThreshold","doubleTapThreshold","swipe","swipeLeft","swipeRight","swipeUp","swipeDown","swipeStatus","pinchIn","pinchOut","pinchStatus","click","tap","doubleTap","longTap","hold","triggerOnTouchEnd","triggerOnTouchLeave","allowPageScroll","fallbackToMouseEvents","excludedElements","preventDefaultEvents","fn","method","$this","this","plugin","data","apply","Array","prototype","slice","call","arguments","error","init","version","phases","directions","pageScroll","ONE","TWO","THREE","FOUR","FIVE","ALL","options","undefined","extend","each","TouchSwipe","element","useTouchEvents","START_EV","MOVE_EV","END_EV","LEAVE_EV","CANCEL_EV","distance","direction","currentDirection","duration","startTouchesDistance","endTouchesDistance","pinchZoom","pinchDistance","pinchDirection","maximumsMap","$element","phase","fingerCount","fingerData","startTime","endTime","previousTouchEndTime","fingerCountAtRelease","doubleTapStartTime","singleTapTimeout","holdTimeout","bind","touchStart","touchCancel","e","enable","disable","removeListeners","destroy","option","property","value","jqEvent","getTouchInProgress","target","closest","length","event","originalEvent","ret","touches","evt","preventDefault","createMaximumsData","cancelMultiFingerRelease","createFingerData","hasPinches","getTimeStamp","calculateTouchesDistance","start","triggerHandler","setTimeout","proxy","trigger","setTouchInProgress","touchMove","inMultiFingerRelease","currentFinger","updateFingerData","clearTimeout","end","calculatePinchDirection","calculatePinchZoom","Math","abs","calculateDirection","last","validateDefaultEvent","calculateDistance","calculateDuration","setMaxDistance","inBounds","bounds","getbounds","isInBounds","getNextPhase","touchEnd","startMultiFingerRelease","didSwipeBackToCancel","validateSwipeDistance","hasTap","triggerHandlerForGesture","touchLeave","unbind","currentPhase","nextPhase","validTime","validateSwipeTime","validDistance","didCancel","didSwipe","hasSwipes","didPinch","didDoubleTap","didLongTap","didTap","gesture","validateSwipe","validatePinch","hasDoubleTap","inDoubleTap","valid","cancelled","getMaxDistance","validatePinchDistance","result","auto","hasCorrectFingerCount","validateFingers","hasEndPoint","validateEndPoint","hasCorrectDistance","hasValidTime","hasValidDistance","x","hasLongTap","validateDoubleTap","now","validateTap","isNaN","validateLongTap","withinThreshold","diff","val","id","f","y","pageX","clientX","pageY","clientY","identifier","getFingerData","max","maxData","createMaximumVO","dir","startPoint","endPoint","diffX","diffY","round","sqrt","startDistance","endDistance","percent","toFixed","pow","calculateAngle","r","atan2","angle","PI","comparePoints","Date","getTime","el","offset","left","right","outerWidth","top","bottom","outerHeight","point","pointA","pointB"],"mappings":"CA8IC,SAASA,SACR,SAAWC,UAAW,YAAcA,OAAOC,KAAOD,OAAOC,IAAIC,OAAQ,CAEnEF,QAAQ,UAAWD,aACd,UAAWI,UAAW,aAAeA,OAAOC,QAAS,CAE1DL,QAAQM,QAAQ,eACX,CAELN,QAAQG,WAEV,SAASI,GACT,YAGA,IAAIC,SAAU,SACZC,KAAO,OACPC,MAAQ,QACRC,GAAK,KACLC,KAAO,OACPC,GAAK,KACLC,IAAM,MAENC,KAAO,OACPC,KAAO,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AAcY,OAAQC,QAC7B,MAAQD,QAAOnD,GAAKoD,OAAOpD,GAAKmD,OAAOvC,GAAKwC,OAAOxC","file":"jquery.touchSwipe.min.js"} \ No newline at end of file diff --git a/jquery.touchSwipe.min.js b/jquery.touchSwipe.min.js index fcc46a9..9324682 100644 --- a/jquery.touchSwipe.min.js +++ b/jquery.touchSwipe.min.js @@ -1,6 +1,6 @@ /*! * @fileOverview TouchSwipe - jQuery Plugin - * @version 1.6.15 + * @version 1.6.16 * * @author Matt Bryson http://www.github.com/mattbryson * @see https://github.com/mattbryson/TouchSwipe-Jquery-Plugin @@ -11,4 +11,4 @@ * Dual licensed under the MIT or GPL Version 2 licenses. * */ -!function(factory){"function"==typeof define&&define.amd&&define.amd.jQuery?define(["jquery"],factory):factory("undefined"!=typeof module&&module.exports?require("jquery"):jQuery)}(function($){"use strict";function init(options){return!options||void 0!==options.allowPageScroll||void 0===options.swipe&&void 0===options.swipeStatus||(options.allowPageScroll=NONE),void 0!==options.click&&void 0===options.tap&&(options.tap=options.click),options||(options={}),options=$.extend({},$.fn.swipe.defaults,options),this.each(function(){var $this=$(this),plugin=$this.data(PLUGIN_NS);plugin||(plugin=new TouchSwipe(this,options),$this.data(PLUGIN_NS,plugin))})}function TouchSwipe(element,options){function touchStart(jqEvent){if(!(getTouchInProgress()||$(jqEvent.target).closest(options.excludedElements,$element).length>0)){var ret,event=jqEvent.originalEvent?jqEvent.originalEvent:jqEvent,touches=event.touches,evt=touches?touches[0]:event;return phase=PHASE_START,touches?fingerCount=touches.length:options.preventDefaultEvents!==!1&&jqEvent.preventDefault(),distance=0,direction=null,currentDirection=null,pinchDirection=null,duration=0,startTouchesDistance=0,endTouchesDistance=0,pinchZoom=1,pinchDistance=0,maximumsMap=createMaximumsData(),cancelMultiFingerRelease(),createFingerData(0,evt),!touches||fingerCount===options.fingers||options.fingers===ALL_FINGERS||hasPinches()?(startTime=getTimeStamp(),2==fingerCount&&(createFingerData(1,touches[1]),startTouchesDistance=endTouchesDistance=calculateTouchesDistance(fingerData[0].start,fingerData[1].start)),(options.swipeStatus||options.pinchStatus)&&(ret=triggerHandler(event,phase))):ret=!1,ret===!1?(phase=PHASE_CANCEL,triggerHandler(event,phase),ret):(options.hold&&(holdTimeout=setTimeout($.proxy(function(){$element.trigger("hold",[event.target]),options.hold&&(ret=options.hold.call($element,event,event.target))},this),options.longTapThreshold)),setTouchInProgress(!0),null)}}function touchMove(jqEvent){var event=jqEvent.originalEvent?jqEvent.originalEvent:jqEvent;if(phase!==PHASE_END&&phase!==PHASE_CANCEL&&!inMultiFingerRelease()){var ret,touches=event.touches,evt=touches?touches[0]:event,currentFinger=updateFingerData(evt);if(endTime=getTimeStamp(),touches&&(fingerCount=touches.length),options.hold&&clearTimeout(holdTimeout),phase=PHASE_MOVE,2==fingerCount&&(0==startTouchesDistance?(createFingerData(1,touches[1]),startTouchesDistance=endTouchesDistance=calculateTouchesDistance(fingerData[0].start,fingerData[1].start)):(updateFingerData(touches[1]),endTouchesDistance=calculateTouchesDistance(fingerData[0].end,fingerData[1].end),pinchDirection=calculatePinchDirection(fingerData[0].end,fingerData[1].end)),pinchZoom=calculatePinchZoom(startTouchesDistance,endTouchesDistance),pinchDistance=Math.abs(startTouchesDistance-endTouchesDistance)),fingerCount===options.fingers||options.fingers===ALL_FINGERS||!touches||hasPinches()){if(direction=calculateDirection(currentFinger.start,currentFinger.end),currentDirection=calculateDirection(currentFinger.last,currentFinger.end),validateDefaultEvent(jqEvent,currentDirection),distance=calculateDistance(currentFinger.start,currentFinger.end),duration=calculateDuration(),setMaxDistance(direction,distance),ret=triggerHandler(event,phase),!options.triggerOnTouchEnd||options.triggerOnTouchLeave){var inBounds=!0;if(options.triggerOnTouchLeave){var bounds=getbounds(this);inBounds=isInBounds(currentFinger.end,bounds)}!options.triggerOnTouchEnd&&inBounds?phase=getNextPhase(PHASE_MOVE):options.triggerOnTouchLeave&&!inBounds&&(phase=getNextPhase(PHASE_END)),phase!=PHASE_CANCEL&&phase!=PHASE_END||triggerHandler(event,phase)}}else phase=PHASE_CANCEL,triggerHandler(event,phase);ret===!1&&(phase=PHASE_CANCEL,triggerHandler(event,phase))}}function touchEnd(jqEvent){var event=jqEvent.originalEvent?jqEvent.originalEvent:jqEvent,touches=event.touches;if(touches){if(touches.length&&!inMultiFingerRelease())return startMultiFingerRelease(event),!0;if(touches.length&&inMultiFingerRelease())return!0}return inMultiFingerRelease()&&(fingerCount=fingerCountAtRelease),endTime=getTimeStamp(),duration=calculateDuration(),didSwipeBackToCancel()||!validateSwipeDistance()?(phase=PHASE_CANCEL,triggerHandler(event,phase)):options.triggerOnTouchEnd||options.triggerOnTouchEnd===!1&&phase===PHASE_MOVE?(options.preventDefaultEvents!==!1&&jqEvent.preventDefault(),phase=PHASE_END,triggerHandler(event,phase)):!options.triggerOnTouchEnd&&hasTap()?(phase=PHASE_END,triggerHandlerForGesture(event,phase,TAP)):phase===PHASE_MOVE&&(phase=PHASE_CANCEL,triggerHandler(event,phase)),setTouchInProgress(!1),null}function touchCancel(){fingerCount=0,endTime=0,startTime=0,startTouchesDistance=0,endTouchesDistance=0,pinchZoom=1,cancelMultiFingerRelease(),setTouchInProgress(!1)}function touchLeave(jqEvent){var event=jqEvent.originalEvent?jqEvent.originalEvent:jqEvent;options.triggerOnTouchLeave&&(phase=getNextPhase(PHASE_END),triggerHandler(event,phase))}function removeListeners(){$element.unbind(START_EV,touchStart),$element.unbind(CANCEL_EV,touchCancel),$element.unbind(MOVE_EV,touchMove),$element.unbind(END_EV,touchEnd),LEAVE_EV&&$element.unbind(LEAVE_EV,touchLeave),setTouchInProgress(!1)}function getNextPhase(currentPhase){var nextPhase=currentPhase,validTime=validateSwipeTime(),validDistance=validateSwipeDistance(),didCancel=didSwipeBackToCancel();return!validTime||didCancel?nextPhase=PHASE_CANCEL:!validDistance||currentPhase!=PHASE_MOVE||options.triggerOnTouchEnd&&!options.triggerOnTouchLeave?!validDistance&¤tPhase==PHASE_END&&options.triggerOnTouchLeave&&(nextPhase=PHASE_CANCEL):nextPhase=PHASE_END,nextPhase}function triggerHandler(event,phase){var ret,touches=event.touches;return(didSwipe()||hasSwipes())&&(ret=triggerHandlerForGesture(event,phase,SWIPE)),(didPinch()||hasPinches())&&ret!==!1&&(ret=triggerHandlerForGesture(event,phase,PINCH)),didDoubleTap()&&ret!==!1?ret=triggerHandlerForGesture(event,phase,DOUBLE_TAP):didLongTap()&&ret!==!1?ret=triggerHandlerForGesture(event,phase,LONG_TAP):didTap()&&ret!==!1&&(ret=triggerHandlerForGesture(event,phase,TAP)),phase===PHASE_CANCEL&&touchCancel(event),phase===PHASE_END&&(touches?touches.length||touchCancel(event):touchCancel(event)),ret}function triggerHandlerForGesture(event,phase,gesture){var ret;if(gesture==SWIPE){if($element.trigger("swipeStatus",[phase,direction||null,distance||0,duration||0,fingerCount,fingerData,currentDirection]),options.swipeStatus&&(ret=options.swipeStatus.call($element,event,phase,direction||null,distance||0,duration||0,fingerCount,fingerData,currentDirection),ret===!1))return!1;if(phase==PHASE_END&&validateSwipe()){if(clearTimeout(singleTapTimeout),clearTimeout(holdTimeout),$element.trigger("swipe",[direction,distance,duration,fingerCount,fingerData,currentDirection]),options.swipe&&(ret=options.swipe.call($element,event,direction,distance,duration,fingerCount,fingerData,currentDirection),ret===!1))return!1;switch(direction){case LEFT:$element.trigger("swipeLeft",[direction,distance,duration,fingerCount,fingerData,currentDirection]),options.swipeLeft&&(ret=options.swipeLeft.call($element,event,direction,distance,duration,fingerCount,fingerData,currentDirection));break;case RIGHT:$element.trigger("swipeRight",[direction,distance,duration,fingerCount,fingerData,currentDirection]),options.swipeRight&&(ret=options.swipeRight.call($element,event,direction,distance,duration,fingerCount,fingerData,currentDirection));break;case UP:$element.trigger("swipeUp",[direction,distance,duration,fingerCount,fingerData,currentDirection]),options.swipeUp&&(ret=options.swipeUp.call($element,event,direction,distance,duration,fingerCount,fingerData,currentDirection));break;case DOWN:$element.trigger("swipeDown",[direction,distance,duration,fingerCount,fingerData,currentDirection]),options.swipeDown&&(ret=options.swipeDown.call($element,event,direction,distance,duration,fingerCount,fingerData,currentDirection))}}}if(gesture==PINCH){if($element.trigger("pinchStatus",[phase,pinchDirection||null,pinchDistance||0,duration||0,fingerCount,pinchZoom,fingerData]),options.pinchStatus&&(ret=options.pinchStatus.call($element,event,phase,pinchDirection||null,pinchDistance||0,duration||0,fingerCount,pinchZoom,fingerData),ret===!1))return!1;if(phase==PHASE_END&&validatePinch())switch(pinchDirection){case IN:$element.trigger("pinchIn",[pinchDirection||null,pinchDistance||0,duration||0,fingerCount,pinchZoom,fingerData]),options.pinchIn&&(ret=options.pinchIn.call($element,event,pinchDirection||null,pinchDistance||0,duration||0,fingerCount,pinchZoom,fingerData));break;case OUT:$element.trigger("pinchOut",[pinchDirection||null,pinchDistance||0,duration||0,fingerCount,pinchZoom,fingerData]),options.pinchOut&&(ret=options.pinchOut.call($element,event,pinchDirection||null,pinchDistance||0,duration||0,fingerCount,pinchZoom,fingerData))}}return gesture==TAP?phase!==PHASE_CANCEL&&phase!==PHASE_END||(clearTimeout(singleTapTimeout),clearTimeout(holdTimeout),hasDoubleTap()&&!inDoubleTap()?(doubleTapStartTime=getTimeStamp(),singleTapTimeout=setTimeout($.proxy(function(){doubleTapStartTime=null,$element.trigger("tap",[event.target]),options.tap&&(ret=options.tap.call($element,event,event.target))},this),options.doubleTapThreshold)):(doubleTapStartTime=null,$element.trigger("tap",[event.target]),options.tap&&(ret=options.tap.call($element,event,event.target)))):gesture==DOUBLE_TAP?phase!==PHASE_CANCEL&&phase!==PHASE_END||(clearTimeout(singleTapTimeout),clearTimeout(holdTimeout),doubleTapStartTime=null,$element.trigger("doubletap",[event.target]),options.doubleTap&&(ret=options.doubleTap.call($element,event,event.target))):gesture==LONG_TAP&&(phase!==PHASE_CANCEL&&phase!==PHASE_END||(clearTimeout(singleTapTimeout),doubleTapStartTime=null,$element.trigger("longtap",[event.target]),options.longTap&&(ret=options.longTap.call($element,event,event.target)))),ret}function validateSwipeDistance(){var valid=!0;return null!==options.threshold&&(valid=distance>=options.threshold),valid}function didSwipeBackToCancel(){var cancelled=!1;return null!==options.cancelThreshold&&null!==direction&&(cancelled=getMaxDistance(direction)-distance>=options.cancelThreshold),cancelled}function validatePinchDistance(){return null!==options.pinchThreshold?pinchDistance>=options.pinchThreshold:!0}function validateSwipeTime(){var result;return result=options.maxTimeThreshold?!(duration>=options.maxTimeThreshold):!0}function validateDefaultEvent(jqEvent,direction){if(options.preventDefaultEvents!==!1)if(options.allowPageScroll===NONE)jqEvent.preventDefault();else{var auto=options.allowPageScroll===AUTO;switch(direction){case LEFT:(options.swipeLeft&&auto||!auto&&options.allowPageScroll!=HORIZONTAL)&&jqEvent.preventDefault();break;case RIGHT:(options.swipeRight&&auto||!auto&&options.allowPageScroll!=HORIZONTAL)&&jqEvent.preventDefault();break;case UP:(options.swipeUp&&auto||!auto&&options.allowPageScroll!=VERTICAL)&&jqEvent.preventDefault();break;case DOWN:(options.swipeDown&&auto||!auto&&options.allowPageScroll!=VERTICAL)&&jqEvent.preventDefault();break;case NONE:}}}function validatePinch(){var hasCorrectFingerCount=validateFingers(),hasEndPoint=validateEndPoint(),hasCorrectDistance=validatePinchDistance();return hasCorrectFingerCount&&hasEndPoint&&hasCorrectDistance}function hasPinches(){return!!(options.pinchStatus||options.pinchIn||options.pinchOut)}function didPinch(){return!(!validatePinch()||!hasPinches())}function validateSwipe(){var hasValidTime=validateSwipeTime(),hasValidDistance=validateSwipeDistance(),hasCorrectFingerCount=validateFingers(),hasEndPoint=validateEndPoint(),didCancel=didSwipeBackToCancel(),valid=!didCancel&&hasEndPoint&&hasCorrectFingerCount&&hasValidDistance&&hasValidTime;return valid}function hasSwipes(){return!!(options.swipe||options.swipeStatus||options.swipeLeft||options.swipeRight||options.swipeUp||options.swipeDown)}function didSwipe(){return!(!validateSwipe()||!hasSwipes())}function validateFingers(){return fingerCount===options.fingers||options.fingers===ALL_FINGERS||!SUPPORTS_TOUCH}function validateEndPoint(){return 0!==fingerData[0].end.x}function hasTap(){return!!options.tap}function hasDoubleTap(){return!!options.doubleTap}function hasLongTap(){return!!options.longTap}function validateDoubleTap(){if(null==doubleTapStartTime)return!1;var now=getTimeStamp();return hasDoubleTap()&&now-doubleTapStartTime<=options.doubleTapThreshold}function inDoubleTap(){return validateDoubleTap()}function validateTap(){return(1===fingerCount||!SUPPORTS_TOUCH)&&(isNaN(distance)||distanceoptions.longTapThreshold&&DOUBLE_TAP_THRESHOLD>distance}function didTap(){return!(!validateTap()||!hasTap())}function didDoubleTap(){return!(!validateDoubleTap()||!hasDoubleTap())}function didLongTap(){return!(!validateLongTap()||!hasLongTap())}function startMultiFingerRelease(event){previousTouchEndTime=getTimeStamp(),fingerCountAtRelease=event.touches.length+1}function cancelMultiFingerRelease(){previousTouchEndTime=0,fingerCountAtRelease=0}function inMultiFingerRelease(){var withinThreshold=!1;if(previousTouchEndTime){var diff=getTimeStamp()-previousTouchEndTime;diff<=options.fingerReleaseThreshold&&(withinThreshold=!0)}return withinThreshold}function getTouchInProgress(){return!($element.data(PLUGIN_NS+"_intouch")!==!0)}function setTouchInProgress(val){$element&&(val===!0?($element.bind(MOVE_EV,touchMove),$element.bind(END_EV,touchEnd),LEAVE_EV&&$element.bind(LEAVE_EV,touchLeave)):($element.unbind(MOVE_EV,touchMove,!1),$element.unbind(END_EV,touchEnd,!1),LEAVE_EV&&$element.unbind(LEAVE_EV,touchLeave,!1)),$element.data(PLUGIN_NS+"_intouch",val===!0))}function createFingerData(id,evt){var f={start:{x:0,y:0},last:{x:0,y:0},end:{x:0,y:0}};return f.start.x=f.last.x=f.end.x=evt.pageX||evt.clientX,f.start.y=f.last.y=f.end.y=evt.pageY||evt.clientY,fingerData[id]=f,f}function updateFingerData(evt){var id=void 0!==evt.identifier?evt.identifier:0,f=getFingerData(id);return null===f&&(f=createFingerData(id,evt)),f.last.x=f.end.x,f.last.y=f.end.y,f.end.x=evt.pageX||evt.clientX,f.end.y=evt.pageY||evt.clientY,f}function getFingerData(id){return fingerData[id]||null}function setMaxDistance(direction,distance){direction!=NONE&&(distance=Math.max(distance,getMaxDistance(direction)),maximumsMap[direction].distance=distance)}function getMaxDistance(direction){return maximumsMap[direction]?maximumsMap[direction].distance:void 0}function createMaximumsData(){var maxData={};return maxData[LEFT]=createMaximumVO(LEFT),maxData[RIGHT]=createMaximumVO(RIGHT),maxData[UP]=createMaximumVO(UP),maxData[DOWN]=createMaximumVO(DOWN),maxData}function createMaximumVO(dir){return{direction:dir,distance:0}}function calculateDuration(){return endTime-startTime}function calculateTouchesDistance(startPoint,endPoint){var diffX=Math.abs(startPoint.x-endPoint.x),diffY=Math.abs(startPoint.y-endPoint.y);return Math.round(Math.sqrt(diffX*diffX+diffY*diffY))}function calculatePinchZoom(startDistance,endDistance){var percent=endDistance/startDistance*1;return percent.toFixed(2)}function calculatePinchDirection(){return 1>pinchZoom?OUT:IN}function calculateDistance(startPoint,endPoint){return Math.round(Math.sqrt(Math.pow(endPoint.x-startPoint.x,2)+Math.pow(endPoint.y-startPoint.y,2)))}function calculateAngle(startPoint,endPoint){var x=startPoint.x-endPoint.x,y=endPoint.y-startPoint.y,r=Math.atan2(y,x),angle=Math.round(180*r/Math.PI);return 0>angle&&(angle=360-Math.abs(angle)),angle}function calculateDirection(startPoint,endPoint){if(comparePoints(startPoint,endPoint))return NONE;var angle=calculateAngle(startPoint,endPoint);return 45>=angle&&angle>=0?LEFT:360>=angle&&angle>=315?LEFT:angle>=135&&225>=angle?RIGHT:angle>45&&135>angle?DOWN:UP}function getTimeStamp(){var now=new Date;return now.getTime()}function getbounds(el){el=$(el);var offset=el.offset(),bounds={left:offset.left,right:offset.left+el.outerWidth(),top:offset.top,bottom:offset.top+el.outerHeight()};return bounds}function isInBounds(point,bounds){return point.x>bounds.left&&point.xbounds.top&&point.y0)){var ret,event=jqEvent.originalEvent?jqEvent.originalEvent:jqEvent,touches=event.touches,evt=touches?touches[0]:event;return phase=PHASE_START,touches?fingerCount=touches.length:options.preventDefaultEvents!==!1&&jqEvent.preventDefault(),distance=0,direction=null,currentDirection=null,pinchDirection=null,duration=0,startTouchesDistance=0,endTouchesDistance=0,pinchZoom=1,pinchDistance=0,maximumsMap=createMaximumsData(),cancelMultiFingerRelease(),createFingerData(0,evt),!touches||fingerCount===options.fingers||options.fingers===ALL_FINGERS||hasPinches()?(startTime=getTimeStamp(),2==fingerCount&&(createFingerData(1,touches[1]),startTouchesDistance=endTouchesDistance=calculateTouchesDistance(fingerData[0].start,fingerData[1].start)),(options.swipeStatus||options.pinchStatus)&&(ret=triggerHandler(event,phase))):ret=!1,ret===!1?(phase=PHASE_CANCEL,triggerHandler(event,phase),ret):(options.hold&&(holdTimeout=setTimeout($.proxy(function(){$element.trigger("hold",[event.target]),options.hold&&(ret=options.hold.call($element,event,event.target))},this),options.longTapThreshold)),setTouchInProgress(!0),null)}}function touchMove(jqEvent){var event=jqEvent.originalEvent?jqEvent.originalEvent:jqEvent;if(phase!==PHASE_END&&phase!==PHASE_CANCEL&&!inMultiFingerRelease()){var ret,touches=event.touches,evt=touches?touches[0]:event,currentFinger=updateFingerData(evt);if(endTime=getTimeStamp(),touches&&(fingerCount=touches.length),options.hold&&clearTimeout(holdTimeout),phase=PHASE_MOVE,2==fingerCount&&(0==startTouchesDistance?(createFingerData(1,touches[1]),startTouchesDistance=endTouchesDistance=calculateTouchesDistance(fingerData[0].start,fingerData[1].start)):(updateFingerData(touches[1]),endTouchesDistance=calculateTouchesDistance(fingerData[0].end,fingerData[1].end),pinchDirection=calculatePinchDirection(fingerData[0].end,fingerData[1].end)),pinchZoom=calculatePinchZoom(startTouchesDistance,endTouchesDistance),pinchDistance=Math.abs(startTouchesDistance-endTouchesDistance)),fingerCount===options.fingers||options.fingers===ALL_FINGERS||!touches||hasPinches()){if(direction=calculateDirection(currentFinger.start,currentFinger.end),currentDirection=calculateDirection(currentFinger.last,currentFinger.end),validateDefaultEvent(jqEvent,currentDirection),distance=calculateDistance(currentFinger.start,currentFinger.end),duration=calculateDuration(),setMaxDistance(direction,distance),ret=triggerHandler(event,phase),!options.triggerOnTouchEnd||options.triggerOnTouchLeave){var inBounds=!0;if(options.triggerOnTouchLeave){var bounds=getbounds(this);inBounds=isInBounds(currentFinger.end,bounds)}!options.triggerOnTouchEnd&&inBounds?phase=getNextPhase(PHASE_MOVE):options.triggerOnTouchLeave&&!inBounds&&(phase=getNextPhase(PHASE_END)),phase!=PHASE_CANCEL&&phase!=PHASE_END||triggerHandler(event,phase)}}else phase=PHASE_CANCEL,triggerHandler(event,phase);ret===!1&&(phase=PHASE_CANCEL,triggerHandler(event,phase))}}function touchEnd(jqEvent){var event=jqEvent.originalEvent?jqEvent.originalEvent:jqEvent,touches=event.touches;if(touches){if(touches.length&&!inMultiFingerRelease())return startMultiFingerRelease(event),!0;if(touches.length&&inMultiFingerRelease())return!0}return inMultiFingerRelease()&&(fingerCount=fingerCountAtRelease),endTime=getTimeStamp(),duration=calculateDuration(),didSwipeBackToCancel()||!validateSwipeDistance()?(phase=PHASE_CANCEL,triggerHandler(event,phase)):options.triggerOnTouchEnd||options.triggerOnTouchEnd===!1&&phase===PHASE_MOVE?(options.preventDefaultEvents!==!1&&jqEvent.preventDefault(),phase=PHASE_END,triggerHandler(event,phase)):!options.triggerOnTouchEnd&&hasTap()?(phase=PHASE_END,triggerHandlerForGesture(event,phase,TAP)):phase===PHASE_MOVE&&(phase=PHASE_CANCEL,triggerHandler(event,phase)),setTouchInProgress(!1),null}function touchCancel(){fingerCount=0,endTime=0,startTime=0,startTouchesDistance=0,endTouchesDistance=0,pinchZoom=1,cancelMultiFingerRelease(),setTouchInProgress(!1)}function touchLeave(jqEvent){var event=jqEvent.originalEvent?jqEvent.originalEvent:jqEvent;options.triggerOnTouchLeave&&(phase=getNextPhase(PHASE_END),triggerHandler(event,phase))}function removeListeners(){$element.unbind(START_EV,touchStart),$element.unbind(CANCEL_EV,touchCancel),$element.unbind(MOVE_EV,touchMove),$element.unbind(END_EV,touchEnd),LEAVE_EV&&$element.unbind(LEAVE_EV,touchLeave),setTouchInProgress(!1)}function getNextPhase(currentPhase){var nextPhase=currentPhase,validTime=validateSwipeTime(),validDistance=validateSwipeDistance(),didCancel=didSwipeBackToCancel();return!validTime||didCancel?nextPhase=PHASE_CANCEL:!validDistance||currentPhase!=PHASE_MOVE||options.triggerOnTouchEnd&&!options.triggerOnTouchLeave?!validDistance&¤tPhase==PHASE_END&&options.triggerOnTouchLeave&&(nextPhase=PHASE_CANCEL):nextPhase=PHASE_END,nextPhase}function triggerHandler(event,phase){var ret,touches=event.touches;return(didSwipe()||hasSwipes())&&(ret=triggerHandlerForGesture(event,phase,SWIPE)),(didPinch()||hasPinches())&&ret!==!1&&(ret=triggerHandlerForGesture(event,phase,PINCH)),didDoubleTap()&&ret!==!1?ret=triggerHandlerForGesture(event,phase,DOUBLE_TAP):didLongTap()&&ret!==!1?ret=triggerHandlerForGesture(event,phase,LONG_TAP):didTap()&&ret!==!1&&(ret=triggerHandlerForGesture(event,phase,TAP)),phase===PHASE_CANCEL&&touchCancel(event),phase===PHASE_END&&(touches?touches.length||touchCancel(event):touchCancel(event)),ret}function triggerHandlerForGesture(event,phase,gesture){var ret;if(gesture==SWIPE){if($element.trigger("swipeStatus",[phase,direction||null,distance||0,duration||0,fingerCount,fingerData,currentDirection]),options.swipeStatus&&(ret=options.swipeStatus.call($element,event,phase,direction||null,distance||0,duration||0,fingerCount,fingerData,currentDirection),ret===!1))return!1;if(phase==PHASE_END&&validateSwipe()){if(clearTimeout(singleTapTimeout),clearTimeout(holdTimeout),$element.trigger("swipe",[direction,distance,duration,fingerCount,fingerData,currentDirection]),options.swipe&&(ret=options.swipe.call($element,event,direction,distance,duration,fingerCount,fingerData,currentDirection),ret===!1))return!1;switch(direction){case LEFT:$element.trigger("swipeLeft",[direction,distance,duration,fingerCount,fingerData,currentDirection]),options.swipeLeft&&(ret=options.swipeLeft.call($element,event,direction,distance,duration,fingerCount,fingerData,currentDirection));break;case RIGHT:$element.trigger("swipeRight",[direction,distance,duration,fingerCount,fingerData,currentDirection]),options.swipeRight&&(ret=options.swipeRight.call($element,event,direction,distance,duration,fingerCount,fingerData,currentDirection));break;case UP:$element.trigger("swipeUp",[direction,distance,duration,fingerCount,fingerData,currentDirection]),options.swipeUp&&(ret=options.swipeUp.call($element,event,direction,distance,duration,fingerCount,fingerData,currentDirection));break;case DOWN:$element.trigger("swipeDown",[direction,distance,duration,fingerCount,fingerData,currentDirection]),options.swipeDown&&(ret=options.swipeDown.call($element,event,direction,distance,duration,fingerCount,fingerData,currentDirection))}}}if(gesture==PINCH){if($element.trigger("pinchStatus",[phase,pinchDirection||null,pinchDistance||0,duration||0,fingerCount,pinchZoom,fingerData]),options.pinchStatus&&(ret=options.pinchStatus.call($element,event,phase,pinchDirection||null,pinchDistance||0,duration||0,fingerCount,pinchZoom,fingerData),ret===!1))return!1;if(phase==PHASE_END&&validatePinch())switch(pinchDirection){case IN:$element.trigger("pinchIn",[pinchDirection||null,pinchDistance||0,duration||0,fingerCount,pinchZoom,fingerData]),options.pinchIn&&(ret=options.pinchIn.call($element,event,pinchDirection||null,pinchDistance||0,duration||0,fingerCount,pinchZoom,fingerData));break;case OUT:$element.trigger("pinchOut",[pinchDirection||null,pinchDistance||0,duration||0,fingerCount,pinchZoom,fingerData]),options.pinchOut&&(ret=options.pinchOut.call($element,event,pinchDirection||null,pinchDistance||0,duration||0,fingerCount,pinchZoom,fingerData))}}return gesture==TAP?phase!==PHASE_CANCEL&&phase!==PHASE_END||(clearTimeout(singleTapTimeout),clearTimeout(holdTimeout),hasDoubleTap()&&!inDoubleTap()?(doubleTapStartTime=getTimeStamp(),singleTapTimeout=setTimeout($.proxy(function(){doubleTapStartTime=null,$element.trigger("tap",[event.target]),options.tap&&(ret=options.tap.call($element,event,event.target))},this),options.doubleTapThreshold)):(doubleTapStartTime=null,$element.trigger("tap",[event.target]),options.tap&&(ret=options.tap.call($element,event,event.target)))):gesture==DOUBLE_TAP?phase!==PHASE_CANCEL&&phase!==PHASE_END||(clearTimeout(singleTapTimeout),clearTimeout(holdTimeout),doubleTapStartTime=null,$element.trigger("doubletap",[event.target]),options.doubleTap&&(ret=options.doubleTap.call($element,event,event.target))):gesture==LONG_TAP&&(phase!==PHASE_CANCEL&&phase!==PHASE_END||(clearTimeout(singleTapTimeout),doubleTapStartTime=null,$element.trigger("longtap",[event.target]),options.longTap&&(ret=options.longTap.call($element,event,event.target)))),ret}function validateSwipeDistance(){var valid=!0;return null!==options.threshold&&(valid=distance>=options.threshold),valid}function didSwipeBackToCancel(){var cancelled=!1;return null!==options.cancelThreshold&&null!==direction&&(cancelled=getMaxDistance(direction)-distance>=options.cancelThreshold),cancelled}function validatePinchDistance(){return null!==options.pinchThreshold?pinchDistance>=options.pinchThreshold:!0}function validateSwipeTime(){var result;return result=options.maxTimeThreshold?!(duration>=options.maxTimeThreshold):!0}function validateDefaultEvent(jqEvent,direction){if(options.preventDefaultEvents!==!1)if(options.allowPageScroll===NONE)jqEvent.preventDefault();else{var auto=options.allowPageScroll===AUTO;switch(direction){case LEFT:(options.swipeLeft&&auto||!auto&&options.allowPageScroll!=HORIZONTAL)&&jqEvent.preventDefault();break;case RIGHT:(options.swipeRight&&auto||!auto&&options.allowPageScroll!=HORIZONTAL)&&jqEvent.preventDefault();break;case UP:(options.swipeUp&&auto||!auto&&options.allowPageScroll!=VERTICAL)&&jqEvent.preventDefault();break;case DOWN:(options.swipeDown&&auto||!auto&&options.allowPageScroll!=VERTICAL)&&jqEvent.preventDefault();break;case NONE:}}}function validatePinch(){var hasCorrectFingerCount=validateFingers(),hasEndPoint=validateEndPoint(),hasCorrectDistance=validatePinchDistance();return hasCorrectFingerCount&&hasEndPoint&&hasCorrectDistance}function hasPinches(){return!!(options.pinchStatus||options.pinchIn||options.pinchOut)}function didPinch(){return!(!validatePinch()||!hasPinches())}function validateSwipe(){var hasValidTime=validateSwipeTime(),hasValidDistance=validateSwipeDistance(),hasCorrectFingerCount=validateFingers(),hasEndPoint=validateEndPoint(),didCancel=didSwipeBackToCancel(),valid=!didCancel&&hasEndPoint&&hasCorrectFingerCount&&hasValidDistance&&hasValidTime;return valid}function hasSwipes(){return!!(options.swipe||options.swipeStatus||options.swipeLeft||options.swipeRight||options.swipeUp||options.swipeDown)}function didSwipe(){return!(!validateSwipe()||!hasSwipes())}function validateFingers(){return fingerCount===options.fingers||options.fingers===ALL_FINGERS||!SUPPORTS_TOUCH}function validateEndPoint(){return 0!==fingerData[0].end.x}function hasTap(){return!!options.tap}function hasDoubleTap(){return!!options.doubleTap}function hasLongTap(){return!!options.longTap}function validateDoubleTap(){if(null==doubleTapStartTime)return!1;var now=getTimeStamp();return hasDoubleTap()&&now-doubleTapStartTime<=options.doubleTapThreshold}function inDoubleTap(){return validateDoubleTap()}function validateTap(){return(1===fingerCount||!SUPPORTS_TOUCH)&&(isNaN(distance)||distanceoptions.longTapThreshold&&DOUBLE_TAP_THRESHOLD>distance}function didTap(){return!(!validateTap()||!hasTap())}function didDoubleTap(){return!(!validateDoubleTap()||!hasDoubleTap())}function didLongTap(){return!(!validateLongTap()||!hasLongTap())}function startMultiFingerRelease(event){previousTouchEndTime=getTimeStamp(),fingerCountAtRelease=event.touches.length+1}function cancelMultiFingerRelease(){previousTouchEndTime=0,fingerCountAtRelease=0}function inMultiFingerRelease(){var withinThreshold=!1;if(previousTouchEndTime){var diff=getTimeStamp()-previousTouchEndTime;diff<=options.fingerReleaseThreshold&&(withinThreshold=!0)}return withinThreshold}function getTouchInProgress(){return!($element.data(PLUGIN_NS+"_intouch")!==!0)}function setTouchInProgress(val){$element&&(val===!0?($element.bind(MOVE_EV,touchMove),$element.bind(END_EV,touchEnd),LEAVE_EV&&$element.bind(LEAVE_EV,touchLeave)):($element.unbind(MOVE_EV,touchMove,!1),$element.unbind(END_EV,touchEnd,!1),LEAVE_EV&&$element.unbind(LEAVE_EV,touchLeave,!1)),$element.data(PLUGIN_NS+"_intouch",val===!0))}function createFingerData(id,evt){var f={start:{x:0,y:0},last:{x:0,y:0},end:{x:0,y:0}};return f.start.x=f.last.x=f.end.x=evt.pageX||evt.clientX,f.start.y=f.last.y=f.end.y=evt.pageY||evt.clientY,fingerData[id]=f,f}function updateFingerData(evt){var id=void 0!==evt.identifier?evt.identifier:0,f=getFingerData(id);return null===f&&(f=createFingerData(id,evt)),f.last.x=f.end.x,f.last.y=f.end.y,f.end.x=evt.pageX||evt.clientX,f.end.y=evt.pageY||evt.clientY,f}function getFingerData(id){return fingerData[id]||null}function setMaxDistance(direction,distance){direction!=NONE&&(distance=Math.max(distance,getMaxDistance(direction)),maximumsMap[direction].distance=distance)}function getMaxDistance(direction){return maximumsMap[direction]?maximumsMap[direction].distance:void 0}function createMaximumsData(){var maxData={};return maxData[LEFT]=createMaximumVO(LEFT),maxData[RIGHT]=createMaximumVO(RIGHT),maxData[UP]=createMaximumVO(UP),maxData[DOWN]=createMaximumVO(DOWN),maxData}function createMaximumVO(dir){return{direction:dir,distance:0}}function calculateDuration(){return endTime-startTime}function calculateTouchesDistance(startPoint,endPoint){var diffX=Math.abs(startPoint.x-endPoint.x),diffY=Math.abs(startPoint.y-endPoint.y);return Math.round(Math.sqrt(diffX*diffX+diffY*diffY))}function calculatePinchZoom(startDistance,endDistance){var percent=endDistance/startDistance*1;return percent.toFixed(2)}function calculatePinchDirection(){return 1>pinchZoom?OUT:IN}function calculateDistance(startPoint,endPoint){return Math.round(Math.sqrt(Math.pow(endPoint.x-startPoint.x,2)+Math.pow(endPoint.y-startPoint.y,2)))}function calculateAngle(startPoint,endPoint){var x=startPoint.x-endPoint.x,y=endPoint.y-startPoint.y,r=Math.atan2(y,x),angle=Math.round(180*r/Math.PI);return 0>angle&&(angle=360-Math.abs(angle)),angle}function calculateDirection(startPoint,endPoint){if(comparePoints(startPoint,endPoint))return NONE;var angle=calculateAngle(startPoint,endPoint);return 45>=angle&&angle>=0?LEFT:360>=angle&&angle>=315?LEFT:angle>=135&&225>=angle?RIGHT:angle>45&&135>angle?DOWN:UP}function getTimeStamp(){var now=new Date;return now.getTime()}function getbounds(el){el=$(el);var offset=el.offset(),bounds={left:offset.left,right:offset.left+el.outerWidth(),top:offset.top,bottom:offset.top+el.outerHeight()};return bounds}function isInBounds(point,bounds){return point.x>bounds.left&&point.xbounds.top&&point.y