Livewire

Livewire painting tool.

Constructor

new Livewire(app)

Parameters:
NameTypeDescription
appApp

The associated application.

Classes

Livewire

Members

dblclick

Handle double click event.

keydown

Handle key down event.

mousedown

Handle mouse down event.

mousemove

Handle mouse move event.

mouseout

Handle mouse out event.

touchend

Handle touch end event.

touchmove

Handle touch move event.

touchstart

Handle touch start event.

Methods

activate(bool)

Activate the tool.

Parameters:
NameTypeDescription
boolboolean

The flag to activate or not.

addEventListener(type, callback)

Add an event listener to this class.

Parameters:
NameTypeDescription
typestring

The event type.

callbackfunction

The function associated with the provided event type, will be called with the fired event.

getEventNames() → {Array}

Get the list of event names that this tool can fire.

Returns:

The list of event names.

Type: 
Array

init()

Initialise the tool.

mouseup(_event)

Handle mouse up event.

Parameters:
NameTypeDescription
_eventobject

The mouse up event.

removeEventListener(type, callback)

Remove an event listener from this class.

Parameters:
NameTypeDescription
typestring

The event type.

callbackfunction

The function associated with the provided event type.

setFeatures(features)

Set the tool live features: shape colour.

Parameters:
NameTypeDescription
featuresobject

The list of features.