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

同一层级中,不同的父节点与子节点之间的垂直间距不同,如何保证连接线不出现弯曲,不对称 #22

Open
qiufeihong2018 opened this issue May 10, 2023 · 1 comment

Comments

@qiufeihong2018
Copy link

qiufeihong2018 commented May 10, 2023

  const result = Hierarchy.mindmap(data, {
      direction: 'LR',
      getHeight(d: node) {
        return d?.height;
      },
      getWidth(d: node) {
        return d?.width;
      },
      getHGap() {
        return 40;
      },
      // 父节点与子节点之间的垂直间距
      getVGap(d: MindMapData) {
        // 缩小节点间的间距。如果出现了校验不通过,那么将高度重置
        return d.type === NodeType.xx&& d.msg? 20 : 8;
      },
      getSide: () => {
        return 'right';
      },
    });
  • Link:
  • Platform:
  • Mini Showcase(like screenshots):

正常如下:
image

然后操作过后,出现了第二层和第三层中间的连接线是不对称的,如下

image

请问这个bug怎么解呢?

@QJvic
Copy link

QJvic commented Nov 16, 2023

+1

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