Classes
Members
keydown
Handle keydown event.
- Source
Methods
activate(bool)
Activate the tool.
Name | Type | Description |
---|---|---|
bool | boolean | Flag to activate or not. |
- Source
addEventListener(type, callback)
Add an event listener to this class.
Name | Type | Description |
---|---|---|
type | string | The event type. |
callback | function | The function associated with the provided event type, will be called with the fired event. |
- Source
getEventNames() → {Array.<string>}
Get the list of event names that this tool can fire.
- Source
The list of event names.
- Type:
- Array.<string>
getFilterList() → {Array}
Get the list of filters.
- Source
The list of filter objects.
- Type:
- Array
getOptionsType() → {string}
Get the type of tool options: here 'instance' since the filter list contains instances of each possible filter.
- Source
The type.
- Type:
- string
getSelectedFilter() → {object}
Get the selected filter.
- Source
The selected filter.
- Type:
- object
hasFilter(name) → {string}
Check if a filter is in the filter list.
Name | Type | Description |
---|---|---|
name | string | The name to check. |
- Source
The filter list element for the given name.
- Type:
- string
init()
Initialise the filter. Called once the image is loaded.
- Source
removeEventListener(type, callback)
Remove an event listener from this class.
Name | Type | Description |
---|---|---|
type | string | The event type. |
callback | function | The function associated with the provided event type. |
- Source
setFeatures(features)
Set the tool live features: filter name.
Name | Type | Description |
---|---|---|
features | object | The list of features. |
- Source
setOptions(options)
Set the tool options.
Name | Type | Description |
---|---|---|
options | object | The list of filter names amd classes. |
- Source