fix server reload
This commit is contained in:
1 parent
dbc3b2099a
commit
faf1116038
4 files changed
+17
-5
No files matched your search
@@ -365,8 +365,18 @@ export default class Editor extends React.Component<EditorProps, EditorState> {
|
||||
this.graph.layout();
|
||||
this.graph.fitCenter();
|
||||
this.graph.set("animate", true);
|
||||
}
|
||||
|
||||
return treeModel;
|
||||
getTreeModel() {
|
||||
const { filepath } = this.props;
|
||||
const data = this.graph.findDataById("1") as GraphNodeModel;
|
||||
this.autoId = Utils.refreshNodeId(data);
|
||||
const root = Utils.createFileData(data);
|
||||
return {
|
||||
name: path.basename(filepath).slice(0, -5),
|
||||
root,
|
||||
desc: this.treeModel.desc,
|
||||
} as BehaviorTreeModel;
|
||||
}
|
||||
|
||||
copyNode() {
|
||||
|
||||
@@ -92,7 +92,8 @@ export default class TreeTabs extends Component<TreeTabsProps, TreeTabsState> {
|
||||
for (let k in this.editors) {
|
||||
let editor = this.editors[k];
|
||||
if (editor) {
|
||||
trees.push(editor.save());
|
||||
editor.save();
|
||||
trees.push(editor.getTreeModel());
|
||||
}
|
||||
}
|
||||
return trees;
|
||||
|
||||
Reference in new issue
Block a user