# Module `Swipe`

Component to handle swipe gestures on node.

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

## Functions

init(self, node, on_swipe_callback) | Component init function
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)
  Component init function

  ### 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 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 Maximum time for swipe trigger (default 0.4)
  - SWIPE_THRESHOLD number Minimum distance for swipe trigger (default 50)
  - SWIPE_TRIGGER_ON_MOVE bool If true, trigger on swipe moving, not only release action (default false)

## Fields

click_zone
  Restriction zone
  - click_zone node (optional)
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