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

【bug】脑图布局,左侧节点hgap间距错误 #19

Open
songispm opened this issue Jun 20, 2022 · 0 comments
Open

【bug】脑图布局,左侧节点hgap间距错误 #19

songispm opened this issue Jun 20, 2022 · 0 comments

Comments

@songispm
Copy link

songispm commented Jun 20, 2022

当根据是不是根节点或节点的层级,来设置不同的横向间距时

结果左侧的间距不对,右侧的间距正确

image

Demo :
在官方g6的示例基础上,
getHGap 中,根据是否根节点返回不同间距

改写下面这一行

getHGap: (node) => {
    return node.id === '0' ? 200 : 60;
},

Demo: https://stackblitz.com/edit/react-rre1us?file=index.js

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

1 participant