antvis/G6

The issue has been closed
[Bug] Wrong gap in Tree Mindmap. #4311
songispm posted onGitHub
Describe the bug
当根据是不是根节点或节点的层级,来设置不同的横向间距时
结果左侧的间距不对,右侧的间距正确
Your Example Website or App
https://stackblitz.com/edit/react-rre1us?file=index.js
Steps to Reproduce the Bug or Issue
在官方g6的示例基础上, getHGap 中,根据是否根节点返回不同间距
改写下面这一行 在官方示例中,ID为0就是根节点
getHGap: (node) => {
return node.id === '0' ? 200 : 60;
},
Expected behavior
两侧边距相等
Screenshots or Videos
No response
Platform
- OS: macOS
- Browser: Chrome
- Version: Latest version
Additional context
No response