new Livewire(app)
Livewire painting tool.
Name | Type | Description |
---|---|---|
app | dwv. | The associated application. |
- Source
Members
started :boolean
Interaction start flag.
- boolean
- Source
style :dwv.gui.Style
Drawing style.
- Source
Methods
activate(bool)
Activate the tool.
Name | Type | Description |
---|---|---|
bool | boolean | The 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 | object | The method associated with the provided event type, will be called with the fired event. |
- Source
dblclick(_event)
Handle double click event.
Name | Type | Description |
---|---|---|
_event | object | The double click event. |
- Source
getEventNames() → {Array}
Get the list of event names that this tool can fire.
- Source
The list of event names.
- Type:
- Array
init()
Initialise the tool.
- Source
keydown(event)
Handle key down event.
Name | Type | Description |
---|---|---|
event | object | The key down event. |
- Source
mousedown(event)
Handle mouse down event.
Name | Type | Description |
---|---|---|
event | object | The mouse down event. |
- Source
mousemove(event)
Handle mouse move event.
Name | Type | Description |
---|---|---|
event | object | The mouse move event. |
- Source
mouseout(event)
Handle mouse out event.
Name | Type | Description |
---|---|---|
event | object | The mouse out event. |
- Source
mouseup(_event)
Handle mouse up event.
Name | Type | Description |
---|---|---|
_event | object | The mouse up event. |
- Source
removeEventListener(type, callback)
Remove an event listener from this class.
Name | Type | Description |
---|---|---|
type | string | The event type. |
callback | object | The method associated with the provided event type. |
- Source
setFeatures(features)
Set the tool live features: shape colour.
Name | Type | Description |
---|---|---|
features | object | The list of features. |
- Source
touchend(event)
Handle touch end event.
Name | Type | Description |
---|---|---|
event | object | The touch end event. |
- Source
touchmove(event)
Handle touch move event.
Name | Type | Description |
---|---|---|
event | object | The touch move event. |
- Source
touchstart(event)
Handle touch start event.
Name | Type | Description |
---|---|---|
event | object | The touch start event. |
- Source
(inner) finishShape()
Finish a livewire (roi) shape.
- Source