fix node height
This commit is contained in:
1 parent
dd3f2e0fb4
commit
c36c3a618c
2 files changed
+7
-4
No files matched your search
@@ -57,6 +57,7 @@ npm run dist # 编译exe可执行文件
|
|||||||
+ 右键菜单
|
+ 右键菜单
|
||||||
+ 面板拖拽新建节点
|
+ 面板拖拽新建节点
|
||||||
+ 变量自动补全
|
+ 变量自动补全
|
||||||
|
+ 设置面板
|
||||||
|
|
||||||
## About
|
## About
|
||||||
目前编辑器还处于非常简陋的阶段,有问题可以联系作者(QQ1013299930),本项目将长期维护,望前端大佬们多提点~
|
目前编辑器还处于非常简陋的阶段,有问题可以联系作者(QQ1013299930),本项目将长期维护,望前端大佬们多提点~
|
||||||
+6
-4
@@ -55,12 +55,14 @@ export const calcTreeNodeSize = (treeNode: GraphNodeModel) => {
|
|||||||
var height = 40;
|
var height = 40;
|
||||||
const updateHeight = (obj: any) => {
|
const updateHeight = (obj: any) => {
|
||||||
if (Array.isArray(obj) || (obj && Object.keys(obj).length > 0)) {
|
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.args);
|
||||||
updateHeight(treeNode.conf.input);
|
updateHeight(treeNode.input);
|
||||||
updateHeight(treeNode.conf.output);
|
updateHeight(treeNode.output);
|
||||||
return [200, height];
|
return [200, height];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user