Constructor
new Region(elementopt, optionsopt)
- Source:
Parameters:
Name | Type | Attributes | Default | Description | ||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
element |
Element |
<optional> |
null
|
The element which should listen to input events. If not provided, will be set to the window unless operating in "headless" mode. | ||||||||||||||||||||||||||||||
options |
object |
<optional> |
Properties
|
Members
activeGestures :Set.<westures-core.Gesture>
- Description:
- The list of active gestures for the current input session.
- Source:
The list of active gestures for the current input session.
Type:
- Set.<westures-core.Gesture>
element :Element
- Description:
- The element being bound to.
- Source:
The element being bound to.
Type:
- Element
gestures :Set.<westures-core.Gesture>
- Description:
- The list of relations between elements, their gestures, and the handlers.
- Source:
The list of relations between elements, their gestures, and the handlers.
Type:
- Set.<westures-core.Gesture>
options :object
- Description:
- The user-supplied options for the Region.
- Source:
The user-supplied options for the Region.
Type:
- object
potentialGestures :Set.<westures-core.Gesture>
- Description:
- The base list of potentially active gestures for the current input session.
- Source:
The base list of potentially active gestures for the current input
session.
Type:
- Set.<westures-core.Gesture>
state :westures-core.State
- Description:
- The internal state object for a Region. Keeps track of inputs.
- Source:
The internal state object for a Region. Keeps track of inputs.
Type:
Methods
addGesture(gesture)
- Description:
- Adds the given gesture to the region.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
gesture |
westures-core.Gesture | Instantiated gesture to add. |
getGesturesByElement(element) → {Array.<westures-core.Gesture>}
- Description:
- Retrieves Gestures by their associated element.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
element |
Element | The element for which to find gestures. |
Returns:
Gestures to which the element is bound.
- Type
- Array.<westures-core.Gesture>
removeGesture(gesture)
- Description:
- Removes the given gesture from the region.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
gesture |
westures-core.Gesture | Instantiated gesture to add. |
removeGesturesByElement(element)
- Description:
- Remove all gestures bound to the given element.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
element |
Element | The element to unbind. |