TimeTraveller
Auto-generated @jbrowse/mobx-state-tree API for the current JBrowse release — see pluggable elements 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 |
|---|---|
historyhistory: [] as unknown[] | |
notTrackingUndonotTrackingUndo: false |
Getters
| Member | Description |
|---|---|
canUndoboolean | |
canRedoboolean |
Actions
| Member | Description |
|---|---|
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 |