History (undo and redo), recordSignals, recordGizmo, bindHistoryKeys.
import { History, bindHistoryKeys, recordGizmo, recordSignals } from 'pixi-silk/history';
Classes#
| Class | Description |
|---|
| History | The default undo stack: steps in memory, transactions, merging and a depth limit. |
Interfaces#
Functions#
| Function | Description |
|---|
| bindHistoryKeys | Binds cmd or ctrl + Z to undo, and shift + cmd or ctrl + Z and ctrl + Y to redo. Keys typed into inputs, text areas and editable elements are left alone. Returns the unbind function. |
| recordGizmo | Records every drag of a transform gizmo as one undoable step. The gizmo knows nothing about history: this watches its dragging signal. Returns the function that stops recording. |
| recordSignals | Records every change of signals into history, so undo works without writing commands. Changes made in the same synchronous run (one handler, one batch) become one step. Inside a transaction everything merges into the transaction’s step. |