antvis/G6

多级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 ... ]

屏幕截图或视频(可选)

微信图片_20231011111325

补充说明(可选)

No response


Hi @sunrisexl, Please star this repo if you find it useful! Thanks :star:! 你好 @sunrisexl。如果该仓库对你有用,可以 star 一下,感谢你的 :star:!

posted by github-actions[bot] over 1 year ago

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。

posted by github-actions[bot] 10 months ago

Fund this Issue

$0.00
Funded

Pull requests