pivotick / History / GraphHistoryLike
Interface: GraphHistoryLike
Defined in: interfaces/History.ts:136
A bounded, session-scoped history of what the canvas holds and shows: what was brought in, what was taken out, what was hidden.
Reached as graph.history. Read it and drive it — the entry kinds are closed, so a consumer cannot record into it. Every entry names the specific elements it touched, which is what lets a sealed entry be skipped mid-span without the ones around it getting out of order.
Methods
canRedo()
canRedo():
boolean
Defined in: interfaces/History.ts:142
Returns
boolean
canUndo()
canUndo():
boolean
Defined in: interfaces/History.ts:141
Returns
boolean
clear()
clear():
void
Defined in: interfaces/History.ts:158
Forget everything. The canvas is left exactly as it is.
Returns
void
entries()
entries():
HistoryEntry[]
Defined in: interfaces/History.ts:138
What has been done and can be undone, newest first — the order the menu renders.
Returns
on()
on(
listener): () =>void
Defined in: interfaces/History.ts:156
Fires on every change to the history. Returns a disposer.
Parameters
listener
(history) => void
Returns
():
void
Returns
void
preview()
preview(
throughEntryId,direction?):HistoryPreview
Defined in: interfaces/History.ts:154
What that span would touch — what drives the hover highlight and the menu's own copy.
Parameters
throughEntryId
string
direction?
"undo" | "redo"
Returns
redo()
redo(
throughEntryId?):HistoryEntry[]
Defined in: interfaces/History.ts:152
Redo the span running back through throughEntryId; the nearest one by default.
Parameters
throughEntryId?
string
Returns
redoable()
redoable():
HistoryEntry[]
Defined in: interfaces/History.ts:140
What has been undone and can be redone, newest first. Emptied by any new action.
Returns
undo()
undo(
throughEntryId?):HistoryEntry[]
Defined in: interfaces/History.ts:150
Undo the span running from the newest entry through throughEntryId; the newest entry alone by default. Lands as one dataBatchChanged.
Parameters
throughEntryId?
string
Returns
the entries actually reversed, newest first — sealed ones are passed over and are not in it.