G6
G6 copied to clipboard
请问批量hideItem后的graph(dagre布局)怎么及时触发对已显示的节点(visible=true)的重新布局?
- [ ] I have searched the issues of this repository and believe that this is not a duplicate.
What problem does this feature solve?
隐藏子节点后需要对显示的节点重新布局
What does the proposed API look like?
无
在不调用graph.layout的前提下,因为调用了layout后之前的节点也都换了位置了
遇到同样的问题了! 试试能否维护一份隐藏后的data,然后graph.changeData(data)更新数据
需要 graph.layout 才能触发重新布局,因为相当于参与布局的数据变更了,重新布局一定会导致节点位置的变更呀。如果是 dagre 布局的话,目前支持在重新布局时尽可能保持当前顺序。如果不是这个问题,请提供一下描述问题的 demo,再重新开 issue 哈,谢谢