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. Runs again whenever the root replaces the session node, so it must be idempotent: it disposes the previous registration and resets the history, because history is volatile while undoIdx is a persisted prop, and old session snapshots kept would let undo apply them to the new session. |
undo() => void | |
redo() => void |