Options
All
  • Public
  • Public/Protected
  • All
Menu

Optional settings that can be passed when creating a new touch swipe instance to customize its behavior.

Hierarchy

  • TouchSwipeSettings

Index

Properties

allowPageScroll: "auto" | "none" | "vertical" | "horizontal"

How the browser handles page scrolls when the user is swiping on a touchSwipe object. See pageScroll.

Defaults to auto.

cancelThreshold: null | number

The number of pixels that the user must move their finger back from the original swipe direction to cancel the gesture.

Defaults to null.

doubleTap: null | PointerHandler

A handler triggered when a user double taps on the item. The delay between taps can be set with the doubleTapThreshold property.

Defaults to null.

doubleTapThreshold: number

Time in milliseconds between 2 taps to count as a double tap.

Defaults to 200.

excludedElements: string

A jQuery selector that specifies child elements that do NOT trigger swipes. By default this excludes elements with the class .noSwipe.

Defaults to ".noSwipe".

fallbackToMouseEvents: boolean

If true mouse events are used when run on a non-touch device, false will stop swipes being triggered by mouse events on non-touch devices.

Defaults to true.

fingerReleaseThreshold: number

Time in milliseconds between releasing multiple fingers. If 2 fingers are down, and are released one after the other, if they are within this threshold, it counts as a simultaneous release.

Defaults to 250.

fingers: number

The number of fingers to detect in a swipe. Any swipes that do not meet this requirement will NOT trigger swipe handlers.

Defaults to 1.

hold: null | PointerHandler

A handler triggered when a user reaches longTapThreshold on the item.

Defaults to null.

longTap: null | PointerHandler

A handler triggered when a user long taps on the item. The delay between start and end can be set with the longTapThreshold property.

Defaults to null.

longTapThreshold: number

Time in milliseconds between tap and release for a long tap.

Defaults to 500.

maxTimeThreshold: null | number

Time, in milliseconds, between touchStart and touchEnd must NOT exceed in order to be considered a swipe.

Defaults to null.

pinchIn: null | PinchHandler

A handler triggered for pinch in events. See also the pinchIn event.

Defaults to null.

pinchOut: null | PinchHandler

A handler triggered for pinch out events. See also the pinchOut event.

Defaults to null.

pinchStatus: PinchPhaseHandler

A handler triggered for every phase of a pinch. See also the pinchStatus event.

Defaults to null.

pinchThreshold: number

The number of pixels that the user must pinch their finger by before it is considered a pinch.

Defaults to 20.

preventDefaultEvents: boolean

By default events are cancelled, so the page does not move. You can disable this so both native events fire as well as your handlers.

Defaults to true.

swipe: null | SwipeHandler

A handler to catch all swipes. See also the swipe event.

Defaults to null.

swipeDown: null | SwipeHandler

A handler that is triggered for down swipes. See also the swipeDown event.

Defaults to null.

swipeLeft: null | SwipeHandler

A handler that is triggered for left swipes. See also the swipeLeft event.

Defaults to null.

swipeRight: null | SwipeHandler

A handler that is triggered for right swipes. See also the swipeRight event.

Defaults to null.

swipeStatus: null | SwipePhaseHandler

A handler triggered for every phase of the swipe. See also the swipeStatus event.

Defaults to null.

swipeUp: null | SwipeHandler

A handler that is triggered for up swipes. See also the swipeUp event.

Defaults to null.

tap: null | PointerHandler

A handler triggered when a user just taps on the item, rather than swipes it. If they do not move, tap is triggered, if they do move, it is not.

Defaults to null.

threshold: number

The number of pixels that the user must move their finger by before it is considered a swipe.

Defaults to 75.

triggerOnTouchEnd: boolean

If true, the swipe events are triggered when the touch end event is received (user releases finger). If false, it will be triggered on reaching the threshold, and then cancel the touch event automatically.

Defaults to true.

triggerOnTouchLeave: boolean

If true, then when the user leaves the swipe object, the swipe will end and trigger appropriate handlers.

Defaults to false.

Generated using TypeDoc