Class: CommandContext
Constructors
Constructor
new CommandContext():
CommandContext
Returns
CommandContext
Methods
apply()
apply(
command,leaveOffUndoStack?):void
Parameters
command
leaveOffUndoStack?
boolean
Returns
void
flattenSequence()
flattenSequence(
sequenceId,initialState):void
Find all commands in history with the given sequence ID, discard all but the last and overwrite its oldState.
Parameters
sequenceId
string
initialState
Returns
void
getAllLayouts()
getAllLayouts():
LayoutData[]
Returns
getLayoutById()
getLayoutById(
layoutId):LayoutData
Parameters
layoutId
string
Returns
getState()
getState():
CommandState|undefined
Returns
CommandState | undefined
initialize()
initialize(
layouts,reloadedState?):void
Parameters
layouts
ILayout[]
reloadedState?
Returns
void
redo()
redo():
void
Returns
void
registerStateCallback()
registerStateCallback(
callback):void
Parameters
callback
() => void
Returns
void
undo()
undo():
void
Returns
void
unregisterStateCallback()
unregisterStateCallback(
callback):void
Parameters
callback
() => void
Returns
void
updateLayouts()
updateLayouts(
newLayouts):void
Updates the layout structure without losing canvas state. Migrates existing layout states to new panel configurations.
Parameters
newLayouts
ILayout[]
Returns
void