Skip to content
pixi-silk
GitHub repository
Interface

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#

ParameterType
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#

ParameterType
commandCommand

Returns#

void