antvis/G6

[Bug] Wrong gap in Tree Mindmap. #4311

songispm posted onGitHub

Describe the bug

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

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

image

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


This issue has been closed because it has been outdate for a long time. Please open a new issue if you still need help.

这个 issue 已经被关闭,因为 它已经过期很久了。 如果你仍然需要帮助,请创建一个新的 issue。

posted by github-actions[bot] 10 months ago

Fund this Issue

$0.00
Funded

Pull requests