Implement save/load events

This commit is contained in:
Eric NGUYEN 2022-09-23 11:01:31 +02:00
parent 614016462f
commit da3bd0a323
3 changed files with 127 additions and 17 deletions

View file

@ -14,6 +14,10 @@ export function Revive(editorState: IEditorState): void {
editorState.historyCurrentStep = history.length - 1;
// restore the parents and the selected container
ReviveHistory(history);
}
export function ReviveHistory(history: IHistoryState[]): void {
for (const state of history) {
ReviveState(state);
}