antvis / layout

Layout algorithms for graphs.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

dagreCompound布局计算的combos的offsetX,offsetY不准确

pg54 opened this issue · comments

offsetX,offsetY不准确,fixSize是准确的,群组大小不能包裹住群组内的节点
image

demo地址:
https://codesandbox.io/s/beautiful-dirac-wylrwm?file=/index.ts

dagreCompound 布局目前针对 G6 进行了兼容优化,可能存在节点位置问题,我会跟进看下如何优化

总结:
G6 和 X6 在节点位置渲染方面有差异,dagreCompound 采用 G6 节点中心为 x y 相对位置来计算,x6 节点是左下角为 x y 渲染,因此我们在 x6 中使用时需要手动复位节点位置,我在 demo 里增加了描述,可以参考看下 :)
DEMO LINK