Classes
Members
dblclick
Handle double click event: some tools use it to finish interaction.
- Source
keydown
Handle key down event.
- Source
mousedown
Handle mouse down event.
- Source
mousemove
Handle mouse move event.
- Source
mouseout
Handle mouse out event.
- Source
mouseup
Handle mouse up event.
- Source
touchend
Handle touch end event.
- Source
touchmove
Handle touch move event.
- Source
touchstart
Handle touch start event.
- Source
wheel
Handle mouse wheel event.
- Source
Methods
activate(flag)
Activate the tool.
Name | Type | Description |
---|---|---|
flag | boolean | The flag to activate or not. |
- Source
addEventListener(type, listener)
Add an event listener on the app.
Name | Type | Description |
---|---|---|
type | string | The event type. |
listener | function | The function associated with the provided event type. |
- Source
getEventNames() → {Array.<string>}
Get the list of event names that this tool can fire.
- Source
The list of event names.
- Type:
- Array.<string>
getOptionsType() → {string}
Get the type of tool options: here 'factory' since the shape list contains factories to create each possible shape.
- Source
The type.
- Type:
- string
hasShape(name) → {boolean}
Check if the shape is in the shape list.
Name | Type | Description |
---|---|---|
name | string | The name of the shape. |
- Source
True if there is a factory for the shape.
- Type:
- boolean
init()
Initialise the tool.
- Source
removeEventListener(type, listener)
Remove an event listener from the app.
Name | Type | Description |
---|---|---|
type | string | The event type. |
listener | function | The function associated with the provided event type. |
- Source
setFeatures(features)
Set the tool live features: shape colour and shape name.
Name | Type | Description |
---|---|---|
features | object | The list of features. |
- Source
setOptions(options)
Set the tool configuration options.
Name | Type | Description |
---|---|---|
options | object | The list of shape names amd classes. |
- Source