TimeTraveller
Auto-generated from the @jbrowse/mobx-state-tree model in the source — see the developer guide for concepts. Built into JBrowse core. View source.
Undo/redo history for a target state-tree node: records snapshots as it changes and exposes canUndo/canRedo with undo/redo actions.
Properties
| Member | Description |
|---|---|
undoIdxundoIdx: -1 | |
targetPathtargetPath: '' |
Volatiles
| Member | Description |
|---|---|
historyunknown[] | |
notTrackingUndoboolean | |
hasPendingRecordboolean |
Getters
| Member | Description |
|---|---|
canUndoboolean | |
canRedoboolean |
Actions
| Member | Description |
|---|---|
setHasPendingRecord(value: boolean) => void | |
flushPendingRecord() => void | |
stopTrackingUndo() => void | |
resumeTrackingUndo() => void | |
addUndoState(snapshot: unknown) => void | |
initialize() => void | Start recording history for the target store. Re-runs whenever the root swaps in a new session node, so it must be idempotent: the previous registration is disposed and the history reset, because history is volatile while undoIdx is a persisted prop — carrying the old session's snapshots forward would make undo apply them to the new one. |
undo() => void | |
redo() => void |