ChangeGroupCommand

Change group command.

Constructor

new ChangeGroupCommand(name, factory, startAnchor, endAnchor, layer, viewController, style)

Parameters:
NameTypeDescription
namestring

The shape display name.

factoryobject

The shape factory.

startAnchorobject

The anchor that starts the change.

endAnchorobject

The anchor that ends the change.

layerDrawLayer

The layer where to change the group.

viewControllerViewController

The associated viewController.

styleStyle

The app style.

Classes

ChangeGroupCommand

Methods

execute()

Execute the command.

getName() → {string}

Get the command name.

Returns:

The command name.

Type: 
string

onExecute(_event)

Handle an execute event.

Parameters:
NameTypeDescription
_eventobject

The execute event with type and id.

onUndo(_event)

Handle an undo event.

Parameters:
NameTypeDescription
_eventobject

The undo event with type and id.

undo()

Undo the command.

Events

drawchange

Draw change event.

Type:
  • object
Properties
NameTypeDescription
idstring

The id of the created draw.

srclayeridstring

The id of the layer of the draw.

dataidstring

The associated data id.