fix copy & debug
This commit is contained in:
1 parent
8564fc1ebe
commit
af3f00b3b2
4 files changed
+7
-4
No files matched your search
@@ -39,6 +39,7 @@ export interface GraphNodeModel extends TreeGraphData {
|
||||
output?: string[];
|
||||
children?: GraphNodeModel[];
|
||||
conf: BehaviorNodeTypeModel;
|
||||
debug?: boolean;
|
||||
|
||||
size?: number[];
|
||||
}
|
||||
@@ -71,6 +71,7 @@ export const createTreeData = (bNode: BehaviorNodeModel, settings: Settings) =>
|
||||
args: bNode.args,
|
||||
input: bNode.input,
|
||||
output: bNode.output,
|
||||
debug: bNode.debug,
|
||||
conf: settings.getNodeConf(bNode.name),
|
||||
};
|
||||
treeData.size = calcTreeNodeSize(treeData);
|
||||
@@ -92,6 +93,7 @@ export const createFileData = (gNode: GraphNodeModel) => {
|
||||
args: gNode.args || undefined,
|
||||
input: gNode.input || undefined,
|
||||
output: gNode.output || undefined,
|
||||
debug: gNode.debug,
|
||||
};
|
||||
if (gNode.children) {
|
||||
nodeData.children = [];
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "behavior3editor",
|
||||
"version": "0.1.2",
|
||||
"version": "0.1.3",
|
||||
"description": "行为树编辑器",
|
||||
"main": "./dist/main.js",
|
||||
"scripts": {
|
||||
|
||||
@@ -366,9 +366,9 @@ export default class Editor extends React.Component<EditorProps, EditorState> {
|
||||
if (!str || str == "") {
|
||||
return;
|
||||
}
|
||||
this.onSelectNode(null);
|
||||
const data = Utils.createTreeData(JSON.parse(str), this.state.settings);
|
||||
this.autoId = Utils.refreshNodeId(data, this.autoId);
|
||||
this.onSelectNode(null);
|
||||
if (!curNodeData.children) {
|
||||
curNodeData.children = [];
|
||||
}
|
||||
@@ -376,8 +376,8 @@ export default class Editor extends React.Component<EditorProps, EditorState> {
|
||||
// this.autoId = Utils.refreshNodeId(this.graph.findDataById("1") as GraphNodeModel);
|
||||
this.changeWithoutAnim();
|
||||
} catch (error) {
|
||||
message.error("粘贴数据有误");
|
||||
console.error("paste error", error);
|
||||
// message.error("粘贴数据有误");
|
||||
console.log("paste error");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user