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

Allow arbor to deal with a single node. #29

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

max333
Copy link

@max333 max333 commented May 21, 2012

Made changes so that arbor can deal with a single node. There are 3 different changes, all in physics.js:

  1. Barnes-Hut was getting in an infinite loop with a single node. It was not even possible to add more nodes. Now Barnes-Hut does nothing when there are less than two nodes.
  2. A single node used to jitter, but now applyCenterDrift does nothing for less than two nodes.
  3. The bounding box would get reduced to a point for a single node, but now the bounding box is unchanged for less two nodes.

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

Successfully merging this pull request may close these issues.

1 participant