# Module `Swipe`

Component to handle swipe gestures on node.

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

Example Link

## Functions

init(self, node, on_swipe_callback) | The Swipe constructor
set_click_zone(self, zone) | Strict swipe click area.

## Tables

style | Component style params.

## Fields

click_zone | Restriction zone
node | Swipe node
on_swipe | Trigger on swipe event(self, swipe_side, dist, delta_time)

## Functions

init(self, node, on_swipe_callback)
  The Swipe constructor

  ### Parameters:

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

  ### Parameters:

  - self Swipe Swipe
  - zone node, string or nil Gui node

## Tables

style
  Component style params. You can override this component styles params in druid styles table or create your own style

  ### Fields:

  - SWIPE_TIME number or nil Maximum time for swipe trigger. Default: 0.4
  - SWIPE_THRESHOLD number or nil Minimum distance for swipe trigger. Default: 50
  - SWIPE_TRIGGER_ON_MOVE boolean or nil If true, trigger on swipe moving, not only release action. Default: false

## Fields

click_zone
  Restriction zone
  - click_zone node or nil
node
  Swipe node
  - node node
on_swipe
  Trigger on swipe event(self, swipe_side, dist, delta_time)
  - on_swipe DruidEvent ) DruidEvent

generated by LDoc TESTING Last updated 2015-01-01 12:00:00