arbor icon indicating copy to clipboard operation
arbor copied to clipboard

Allow arbor to deal with a single node.

Open max333 opened this issue 12 years ago • 0 comments

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.

max333 avatar May 21 '12 01:05 max333