# Defold Druid UI Library

# Module `druid.swipe`

Component to handle swipe gestures on node.

Swipe will be triggered, if swipe was started and ended on one node

## Functions

init(node, on_swipe_callback) | Component init function
set_click_zone(zone) | Strict swipe click area.

## Tables

Events | Component events
Style | Component style params

## Functions

init(node, on_swipe_callback)
  Component init function

  ### Parameters:

  - node node Gui node
  - on_swipe_callback function Swipe callback for onswipeend event
set_click_zone(zone)
  Strict swipe click area. Useful for restrict events outside stencil node

  ### Parameters:

  - zone node Gui node

## Tables

Events
  Component events

  ### Fields:

  - on_swipe druid_event Trigger on swipe event
Style
  Component style params

  ### Fields:

  - SWIPE_TIME number Maximum time for swipe trigger
  - SWIPE_THRESHOLD number Minimum distance for swipe trigger
  - SWIPE_TRIGGER_ON_MOVE bool If true, trigger on swipe moving, not only release action

generated by LDoc 1.4.6 Last updated 2020-04-17 20:13:54