DrawBrushCommand

Draw brush command.

Constructor

new DrawBrushCommand(properties)

Parameters:
NameTypeDescription
propertiesDrawBrushCommandProperties

The command properties.

Methods

execute()

Execute the command.

getExecuteEvent() → {CustomEvent}

Get the execute event.

Returns:

The event.

Type: 
CustomEvent

getName() → {string}

Get the command name.

Returns:

The command name.

Type: 
string

getOriginalValuesLists() → {Array|undefined}

Get the original values before applying brush.

Returns:

Lists of original value iterators, undefined when erasing.

Type: 
Array | undefined

onExecute(_event)

Handle an execute event.

Parameters:
NameTypeDescription
_eventCustomEvent

The execute event with type and id.

onUndo(_event)

Handle an undo event.

Parameters:
NameTypeDescription
_eventCustomEvent

The undo event with type and id.

undo()

Undo the command.

Fires:
  • DrawBrushCommand#event:brushremove

Events

brushdraw

Draw create event.

Type:
  • object
Properties
NameTypeDescription
idnumber

The id of the created brush.