Skip to content
pixi-silk
GitHub repository
Interface

Command

import type { Command } from 'pixi-silk/history';

One undoable change.

Properties#

PropertyTypeDescriptionDefined in
label?stringShown in menus and buttons: “Undo Move”.history.ts:13

Methods#

do()#

do(): void;

Applies the change (redo calls it again).

Returns#

void


merge()?#

optional merge(next: Command, grouped: boolean): boolean;

Folds next into this command and returns true, or returns false to keep them apart. grouped is true inside a transaction. Lets typing or nudges become one step.

Parameters#

ParameterType
nextCommand
groupedboolean

Returns#

boolean


undo()#

undo(): void;

Reverts it.

Returns#

void