show reload alert dialog

This commit is contained in:
codetypes committed 2024-11-21 23:04:39 +08:00
1 parent 78ee7bcc76
commit 1cced07da9
3 files changed
+21 -25

No files matched your search

+7 -3
View File
@@ -342,9 +342,13 @@ export const Editor: FC<EditorProps> = ({ onUpdate: updateState, data: editor, .
const file = readJson(editor.path) as TreeModel;
editor.data = b3util.createTreeData(file.root);
editor.autoId = b3util.refreshTreeDataId(editor.data);
editor.graph.changeData(editor.data);
editor.graph.layout();
restoreViewport();
editor.unsave = false;
updateState();
if (editor.graph) {
editor.graph.changeData(editor.data);
editor.graph.layout();
restoreViewport();
}
};
const checkSubtree = () => {