D3 circles bounce and change when touched

broken image
broken image

If iterations is not specified, returns the current iteration count which defaults to 1. The change in velocity is dampened by the force’s strength such that the resolution of simultaneous overlaps can be blended together to find a stable solution. For each node, the other nodes that are anticipated to overlap at the next tick (using the anticipated positions ⟨ x + vx, y + vy⟩) are determined the node’s velocity is then modified to push the node out of each overlapping node.

broken image

Overlapping nodes are resolved through iterative relaxation.

broken image

If strength is not specified, returns the current strength which defaults to 1. If strength is specified, sets the force strength to the specified number in the range and returns this force.The resulting number is then stored internally, such that the radius of each node is only recomputed when the force is initialized or when this method is called with a new radius, and not on every application of the force. The radius accessor is invoked for each node in the simulation, being passed the node and its zero-based index.

broken image