antvis/G6
Do you want to work on this issue?
You can request for a bounty in order to promote it!
In the comboCombined layout, after the dagre direction is changed from rankdir: 'LR' to rankdir: 'TB', and then the combo node is expanded, the position of the combo expansion is still the previous position? #6359
licc12 posted onGitHub
Describe the bug / 问题描述
comboCombined 布局中, dagre方向由 rankdir: 'LR' 切换为 rankdir: 'TB' 后,再展开combo节点,此时combo展开的位置还是之前的位置:
期望:combo展开的位置与折叠状态的位置一致,而不是切换方向前的位置;
const graph = new G6.Graph({
container: 'container',
width,
height,
layout: {
animate: true,
type: 'comboCombined',
sortByCombo: false,
collapsed: true,
innerLayout: new G6.Layout.grid({
collapsed: true,
}),
minZoom: 1,
maxZoom: 1,
outerLayout: new G6.Layout.dagre({
nodesep: 30, // 节点间距
ranksep: 60, // 层间距
nodeSize: 30,
minZoom: 1,
maxZoom: 2.5,
rankdir: 'LR',
linkDistance: 50,
controlPoints: true, // 可选
preventOverlap: false,
}),
comboPadding: 20,
},
});
Reproduction link / 重现链接
https://codesandbox.io/p/sandbox/musing-herschel-r2dk4x
Steps to Reproduce the Bug or Issue / 重现步骤
- 切换dagre的方向
- 点击combo展开
- 此时可看到combo位置不对
G6 Version / G6 版本
4.x
Operating System / 操作系统
macOS
Browser / 浏览器
Chrome
Additional context / 补充说明
G6版本: "@antv/g6": "^4.8.23"