Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
pg54 opened this issue Oct 12, 2023 · 2 comments
Open

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

pg54 opened this issue Oct 12, 2023 · 2 comments

Comments

@pg54
Copy link

pg54 commented Oct 12, 2023

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

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

@pg54 pg54 changed the title dagreCompound布局计算的combos的offsetX,offsetY不准确, dagreCompound布局计算的combos的offsetX,offsetY不准确 Oct 12, 2023
@simplejason
Copy link
Contributor

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

@simplejason
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants