MoveGroupCommand

Move group command.

Constructor

new MoveGroupCommand(group, name, translation, layer)

Parameters:
NameTypeDescription
groupKonva.Group

The group draw.

namestring

The shape display name.

translationobject

A 2D translation to move the group by.

layerKonva.Layer

The layer where to move the group.

Classes

MoveGroupCommand

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

drawmove

Draw move event.

Type:
  • object
Properties
NameTypeDescription
idnumber

The id of the create draw.