HistoryLike
import type { HistoryLike } from 'pixi-silk/history';
What undoable widgets need from a history. Implement it to plug in your own store: record
gets changes that are already applied, begin and end bracket a gesture such as a drag.
Methods#
begin()#
begin(label?: string): void;
Opens a transaction: what is recorded until end() becomes one step. Nests.
Parameters#
| Parameter | Type |
|---|---|
label? | string |
Returns#
void
end()#
end(): void;
Closes the transaction opened last.
Returns#
void
record()#
record(command: Command): void;
Records a change that is already applied.
Parameters#
| Parameter | Type |
|---|---|
command | Command |
Returns#
void