fix node height
This commit is contained in:
1 parent
dd3f2e0fb4
commit
c36c3a618c
2 files changed
+7
-4
No files matched your search
+6
-4
@@ -55,12 +55,14 @@ export const calcTreeNodeSize = (treeNode: GraphNodeModel) => {
|
||||
var height = 40;
|
||||
const updateHeight = (obj: any) => {
|
||||
if (Array.isArray(obj) || (obj && Object.keys(obj).length > 0)) {
|
||||
height += 30;
|
||||
const { str, line } = toBreakWord(`参数:${JSON.stringify(obj)}`, 35);
|
||||
console.log("line", str, line);
|
||||
height += 20 * line;
|
||||
}
|
||||
};
|
||||
updateHeight(treeNode.conf.args);
|
||||
updateHeight(treeNode.conf.input);
|
||||
updateHeight(treeNode.conf.output);
|
||||
updateHeight(treeNode.args);
|
||||
updateHeight(treeNode.input);
|
||||
updateHeight(treeNode.output);
|
||||
return [200, height];
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user