Skip to content

Can the spacing between nodes remain the same even if the custom node widths are different? #521

Open
@blusoul

Description

@blusoul

Are you reporting a bug, or opening a feature request?
feature

What is the actual behavior/output?
Can renderCustomNodeElement be used to create custom nodes where the content does not wrap, the spacing between nodes is equal, and nodes do not overlap ?

What is the behavior/output you expect?
If nodeSize is used to specify the width, the nodes overlap; if the dynamically calculated maximum node width is used, the spacing between nodes is inconsistent.

nodeSize={{ x: 250, y: 80 }}
// another
nodeSize={{ x: maxWidth, y: 80 }}

Can you consistently reproduce the issue/create a reproduction case (e.g. on https://codesandbox.io/)?
demo

Image

Image

What version of react-d3-tree are you using?
3.6.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions