antv-dagre布局 sortByCombo 功能无法使用 #7554
Unanswered
mathissosodifficult
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
因为图有多层combo,出于性能考虑,我在图初始化时只传入了第二层的combo(combo内的combo及node都没有传),,并折叠展示,这些combo还有上一层的combo,因为布局算法只能作用于node,所以我在combo内增加了个fakeNode,把所有的边连接在fakeNode之间;当双击combo时会触发方法,从后端获取这个combo内的combo或是节点,以及内外部的边。我采用layout的是combo-combined,outerLayout采用了AntVDagreLayout,开启了sortByCombo: true,文档里描述说“同一层节点是否根据每个节点数据中的 parentId 进行排序,以防止 Combo 重叠”,node中并没有parentId,我也在每个node中设置了combo字段的值,开启sortByCombo无法防止combo重叠。
Beta Was this translation helpful? Give feedback.
All reactions