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

layout/force: handle case of zero weight on both linked nodes #2091

Closed
wants to merge 1 commit into from

Conversation

alon
Copy link
Contributor

@alon alon commented Oct 26, 2014

In this case treat both nodes as having an equal weight of 1
(arbitrary).

This fixes a divide by zero error otherwise.

I've included a signed-off (saying that I'm the author of the code). I didn't sign the contributor agreement since this falls under the trivial rule. Correct me if I am mistaken.

In this case treat both nodes as having an equal weight of 1
(arbitrary).

This fixes a divide by zero error otherwise.

Signed-off-by: Alon Levy <alon@pobox.com>
@mbostock mbostock added the bug Something isn’t working label Oct 21, 2015
@mbostock mbostock modified the milestones: 3.5.x, 3.5.7 Oct 21, 2015
@mbostock
Copy link
Member

This fix doesn’t handle the case where only one of s or t has a zero weight (it treats the zero weight as one), but that’s easy enough to fix. 😁

@mbostock
Copy link
Member

Merged into #2591 for 3.5.7.

@mbostock mbostock closed this Oct 26, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn’t working
Development

Successfully merging this pull request may close these issues.

None yet

2 participants