reload server
This commit is contained in:
1 parent
c7f65abccf
commit
130aec7363
7 files changed
+203
-35
No files matched your search
@@ -332,14 +332,16 @@ export default class Editor extends React.Component<EditorProps, EditorState> {
|
||||
save() {
|
||||
const { filepath } = this.props;
|
||||
const root = Utils.createFileData(this.graph.findDataById("1") as GraphNodeModel);
|
||||
const treeModel = {
|
||||
name: path.basename(filepath).slice(0, -5),
|
||||
root,
|
||||
desc: root.desc,
|
||||
} as BehaviorTreeModel;
|
||||
fs.writeFileSync(
|
||||
filepath,
|
||||
JSON.stringify({
|
||||
name: path.basename(filepath).slice(0, -5),
|
||||
root,
|
||||
desc: root.desc,
|
||||
})
|
||||
JSON.stringify(treeModel)
|
||||
);
|
||||
return treeModel;
|
||||
}
|
||||
|
||||
copyNode() {
|
||||
|
||||
Reference in new issue
Block a user