Skip to content

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

Open
@songispm

Description

@songispm

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

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

image

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

改写下面这一行

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

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions