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

padding in pack layout applies to both parent and siblings #8

Closed
wants to merge 1 commit into from

Conversation

larskotthoff
Copy link

As discussed in #7.

levels[i].forEach(function(d) {
if (d.children && d.children.length > 0) {
d.children.forEach(function(e) { e.r += dr; });
d3_layout_packSiblings(d);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you want to say packChildren here.

@larskotthoff
Copy link
Author

Fixed the function call, thanks for pointing that out. Serves me right for just copying over the diff.

@mbostock
Copy link
Member

I need to think through whether this is the optimal solution. I feel like it should be simpler (like, just modifying the radius after computing the enclosing circle), but I understand that it gets complicated because of how the padding is scaled. Right now I’m working through a massive backlog of issues, but I should get back to working on this repository in the near future.

@mbostock
Copy link
Member

Also see d3/d3#2473.

@mbostock
Copy link
Member

I’ve implemented parent-child padding in the new pack layout; pack.padding now applies both to sibling-sibling and parent-child relationships.

@mbostock mbostock closed this Mar 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants