Closed sunrisexl closed 4 months ago
Hi @sunrisexl, Please star this repo if you find it useful! Thanks :star:! 你好 @sunrisexl。如果该仓库对你有用,可以 star 一下,感谢你的 :star:!
This issue has been closed because it has been outdate for a long time. Please open a new issue if you still need help.
这个 issue 已经被关闭,因为 它已经过期很久了。 如果你仍然需要帮助,请创建一个新的 issue。
问题描述
多级combo嵌套,node与分组之间存在连线,使用层次布局,并开启sortByCombo时,报错
重现链接
https://g6.antv.antgroup.com/examples/net/comboLayout#comboCombined
重现步骤
1.打开页面,替换js代码: import G6 from '@antv/g6'; const data = { nodes: [ { id: '0', comboId: 'a', }, { id: '1', }, ], edges: [ { source: '1', target: 'b', } ], combos: [ { id: 'a', label: 'Combo A', parentId: 'b', }, { id: 'b', label: 'Combo B', }, ], }; const container = document.getElementById('container'); const width = container.scrollWidth; const height = (container.scrollHeight || 500) - 160; const graph = new G6.Graph({ container: 'container', width, height, fitView: true, fitViewPadding: 50, animate: true, modes: { default: ['drag-combo', 'drag-node', 'drag-canvas', 'zoom-canvas', 'collapse-expand-combo'], }, }); graph.data(data); graph.render(); graph.updateLayout({ type: 'dagre', rankdir: 'LR', sortByCombo: true, });
预期行为
期望正确的布局,但是控制台出现报错,拓扑没有正确布局
平台
屏幕截图或视频(可选)
补充说明(可选)
No response