Skip to content

Latest commit

 

History

History
25 lines (21 loc) · 822 Bytes

recognizer-swipe.md

File metadata and controls

25 lines (21 loc) · 822 Bytes
layout title
default
Swipe recognizer

Hammer.Swipe(options)

Recognized when the pointer is moving fast (velocity), with enough distance in the allowed direction.

Option Default Description
event swipe Name of the event.
pointers 1 Required pointers.
threshold 10 Minimal distance required before recognizing.
direction DIRECTION_ALL Direction of the panning.
velocity 0.3 Minimal velocity required before recognizing, unit is in px per ms.

Events

  • swipe, together with all of below
  • swipeleft
  • swiperight
  • swipeup
  • swipedown

Notes

When calling Hammer() to create a simple instance, the pan and swipe recognizers are configured to only detect horizontal gestures.