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