Gestures

A draggable box, a tap counter and an area that tells a drag from a tap, built with AngularLynx's gesture recognizers.

What it shows

  • [lynxGesture] — attaches a gesture object to an element. Import LynxGestureDetector to use it. See Gestures.
  • PanGesture — onUpdate reports translationX and translationY from the start of each drag. The example adds them to a saved offset, so the box stays where you drop it.
  • TapGesture — onEnd counts each tap.
  • Gesture.Exclusive() — tries the gestures in order, so the tap only fires if the pan fails. A drag wins over a tap. See Gesture API.
  • Builder methods — .minDistance(5).onUpdate(…).onEnd(…) configures each gesture in one chain. See Gesture types.