多级combo嵌套,node与分组之间存在连线,使用层次布局,并开启sortByCombo时,报错 #5055
sunrisexl posted onGitHub
问题描述
多级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, });
预期行为
期望正确的布局,但是控制台出现报错,拓扑没有正确布局
平台
- 操作系统: [macOS, Windows, Linux, React Native ...]
- 网页浏览器: [Google Chrome, Safari, Firefox]
- G6 版本: [4.5.1 ... ]
屏幕截图或视频(可选)
补充说明(可选)
No response