Command
import type { Command } from 'pixi-silk/history';
One undoable change.
Properties#
| Property | Type | Description | Defined in |
|---|---|---|---|
label? | string | Shown 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#
| Parameter | Type |
|---|---|
next | Command |
grouped | boolean |
Returns#
boolean
undo()#
undo(): void;
Reverts it.
Returns#
void