antvis/G6


Do you want to work on this issue?
You can request for a bounty in order to promote it!
4.7.9版本dagre布局自定义节点,出现重叠情况 #6183
nancyzhan posted onGitHub
Describe the bug / 问题描述
4.7.9版本dagre布局自定义节点,会出现重叠情况。对应布局代码
layout: {
type: 'dagre',
rankdir: 'LR',
nodesep: 5,
ranksepFunc: (node) => {
// 获取节点的宽度
const nodeWidth = node.attr.computeWidth; // 如果模型中没有宽度,设为默认值
if(nodeWidth > 200) {
return nodeWidth/2;
}
return 100;
},
controlPoints: false,
preventOverlap: true, // 防止节点重叠
}
Reproduction link / 重现链接
No response
Steps to Reproduce the Bug or Issue / 重现步骤
No response
G6 Version / G6 版本
4.x
Operating System / 操作系统
Windows
Browser / 浏览器
Chrome
Additional context / 补充说明
No response