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

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

Open
blusoul opened this issue Feb 6, 2025 · 0 comments

Comments

@blusoul
Copy link

blusoul commented Feb 6, 2025

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

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

1 participant