documentation

Documentation generator: JsDoc Toolkit 2.4.0
Template: Wink 1.0
Generated on:

Namespace wink.ux.gesture

Implements a Gesture management system. Determines whether some gestures (with exactly 2 fingers) are performed on the nodes and if so, inform the listeners. Gestures that can be listened are referenced in the "_knownGestures" attribute below. The notifications to the listeners include parameters that depends on gesture type.

The gesture object is able to determines whether some gestures (with exactly 2 fingers) are performed on the nodes and if so, inform the listeners. Gestures that can be listened are :
- two_digits_click: on click with 2 fingers
- two_digits_press: on pressure with 2 fingers
- enlargement: A separation of the 2 fingers, as if to zoom in
- narrowing: bring 2 fingers closer, as if to zoom out
- rotation: a rotation with 2 fingers
- instant_scale: Each alignment or each spacing of 2 fingers
- instant_rotation: Each rotation of 2 fingers
- gesture_end: the end a a gesture

The notifications to the listeners include parameters that depends on gesture type.

Namespace Summary
Constructor Attributes Constructor Name and Description
 
Compatibility
Compatibility list Supported platforms / browsers
iOS2, iOS3, iOS4, iOS5, iOS6

Method Summary

Namespace Detail

wink.ux.gesture
var node = wink.byId("nodeId");
wink.ux.gesture.listenTo(node, "two_digits_click", { context: window, method: "twoDigitsClick" }, { preventDefault: true });
See:
Test page
Test page (box)

Method Detail

  • <static> wink.ux.gesture.listenTo(domNode, gesture, callback, options)
    Allows to listen for a specific gesture on a dom Node
    Parameters:
    {HTMLElement} domNode
    the DOM node that listens to gesture
    {string} gesture
    The gesture name to listen
    {object|function} callback
    The callback to invoke when this gesture is done
    {object} options Optional
    The options associated to the listener
    {boolean} options.preventDefault Optional, Default: false
    Indicates whether an automatic preventDefault must be done
  • <static> wink.ux.gesture.unlistenTo(domNode, gesture, callback)
    Allows to unlisten for a specific gesture on a dom Node
    Parameters:
    {HTMLElement} domNode
    The DOM node that listens to gesture
    {string} gesture
    The gesture name to unlisten
    {object|function} callback
    The callback that was previously added (identified by { context, method })