new DrawGroupCommand(group, name, layer, silent)
Draw group command.
Parameters:
Name | Type | Description |
---|---|---|
group | object | The group draw. |
name | string | The shape display name. |
layer | object | The layer where to draw the group. |
silent | boolean | Whether to send a creation event or not. |
- Source
Methods
execute()
Execute the command.
- Source
getName() → {string}
Get the command name.
- Source
Returns:
The command name.
- Type:
- string
onExecute(_event)
Handle an execute event.
Parameters:
Name | Type | Description |
---|---|---|
_event | object | The execute event with type and id. |
onUndo(_event)
Handle an undo event.
Parameters:
Name | Type | Description |
---|---|---|
_event | object | The undo event with type and id. |
undo()
Undo the command.
- Source
Events
drawcreate
Draw create event.
Type:
Properties- object
Name | Type | Description |
---|---|---|
id | number | The id of the create draw. |
- Source