antvis/G6

The issue has been closed
dagre层次图中,combo存在时,节点和边的toFront()和toBack()方法不生效 #4467
hualinzhang posted onGitHub
Describe the bug
dagre层次图中,combo存在时,节点和边的toFront()和toBack()方法不生效
Your Example Website or App
https://g6.antv.antgroup.com/zh/examples/net/dagreFlow/#dagreCombo
Steps to Reproduce the Bug or Issue
修改上面的示例,当图渲染完成之后,将节点的层级升高,增加代码: this.graph.getNodes().forEach((node) => {
node.toFront();
}); this.graph.paint(); // 更改层级后需要重新绘制图
本来应该会让edge显示在node之下,但是,这个功能没生效,edge依旧显示在node上面,如下图:
但是,将combo的数据注释掉之后,如下图,那个代码就生效了,如下图,对edge设置toFront()也生效
Expected behavior
希望combo存在的情况下,节点和边的toFront()和toBack()方法能生效
Screenshots or Videos
No response
Platform
- OS: [e.g. macOS, Windows, Linux]
- Browser: [e.g. Chrome, Safari, Firefox]
- Version: [e.g. 91.1]
Additional context
No response