Constructor
new DrawBrushCommand(properties)
Parameters:
Name | Type | Description |
---|---|---|
properties | DrawBrushCommandProperties | The command properties. |
- Source
Methods
execute()
Execute the command.
- Source
getExecuteEvent() → {CustomEvent}
Get the execute event.
- Source
Returns:
The event.
- Type:
- CustomEvent
getName() → {string}
Get the command name.
- Source
Returns:
The command name.
- Type:
- string
getOriginalValuesLists() → {Array|undefined}
Get the original values before applying brush.
- Source
Returns:
Lists of original value iterators, undefined when erasing.
- Type:
- Array |
undefined
onExecute(_event)
Handle an execute event.
Parameters:
Name | Type | Description |
---|---|---|
_event | CustomEvent | The execute event with type and id. |
- Source
onUndo(_event)
Handle an undo event.
Parameters:
Name | Type | Description |
---|---|---|
_event | CustomEvent | The undo event with type and id. |
- Source
undo()
Undo the command.
- Source
Fires:
- DrawBrushCommand#event:brushremove
Events
brushdraw
Draw create event.
Type:
Properties- object
Name | Type | Description |
---|---|---|
id | number | The id of the created brush. |
- Source