Members | Methods |
---|---|
Constructor
new GesturePointList(type)
Parameters:
Name | Type | Description |
---|---|---|
type |
String | The pointer device type: "mouse", "touch", "pen", etc. |
- Source:
Members
buttons :Number
Current buttons pressed for the device.
Combination of bit flags 0: none, 1: primary (or touch contact), 2: secondary, 4: aux (often middle), 8: X1 (often back), 16: X2 (often forward), 32: pen eraser.
Type:
- Number
- Source:
captureCount :Number
Current number of captured pointers for the device.
Type:
- Number
- Source:
clicks :Number
Current number of clicks for the device. Used for multiple click gesture tracking.
Type:
- Number
- Source:
contacts :Number
Current number of contact points (touch points, mouse down, etc.) for the device.
Type:
- Number
- Source:
type :String
The pointer device type: "mouse", "touch", "pen", etc.
Type:
- String
- Source:
Methods
add(gesturePoint) → {Number}
Parameters:
Name | Type | Description |
---|---|---|
gesturePoint |
OpenSeadragon.MouseTracker.GesturePoint | A gesture point to add to the list. |
- Source:
Returns:
Number of gesture points in the list.
- Type
- Number
addContact()
Increment this pointer list's contact count.
It will evaluate whether this pointer type is allowed to have multiple contacts.
- Source:
asArray() → {Array.<OpenSeadragon.MouseTracker.GesturePoint>}
- Source:
Returns:
The list of gesture points in the list as an array (read-only).
- Type
- Array.<OpenSeadragon.MouseTracker.GesturePoint>
getById(id) → {OpenSeadragon.MouseTracker.GesturePoint|null}
Parameters:
Name | Type | Description |
---|---|---|
id |
Number | The id of the gesture point to retrieve from the list. |
- Source:
Returns:
The gesture point with the given id, or null if not found.
- Type
- OpenSeadragon.MouseTracker.GesturePoint | null
getByIndex(index) → {OpenSeadragon.MouseTracker.GesturePoint|null}
Parameters:
Name | Type | Description |
---|---|---|
index |
Number | The index of the gesture point to retrieve from the list. |
- Source:
Returns:
The gesture point at the given index, or null if not found.
- Type
- OpenSeadragon.MouseTracker.GesturePoint | null
getLength() → {Number}
- Source:
Returns:
Number of gesture points in the list.
- Type
- Number
getPrimary() → {OpenSeadragon.MouseTracker.GesturePoint|null}
- Source:
Returns:
The primary gesture point in the list, or null if not found.
- Type
- OpenSeadragon.MouseTracker.GesturePoint | null
removeById(id) → {Number}
Parameters:
Name | Type | Description |
---|---|---|
id |
Number | The id of the gesture point to remove from the list. |
- Source:
Returns:
Number of gesture points in the list.
- Type
- Number
removeContact()
Decrement this pointer list's contact count.
It will make sure the count does not go below 0.
- Source: