# 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

Fields | Components fields
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

Fields
  Components fields

  ### Fields:

  - node node Swipe node
  - click_zone node Restriction zone (optional)
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-05-04 00:51:46