block by emeeks b3851789fcc3bf0c65ea9a34c3dca7bb

Bounding Box Collision

Full Screen

A simple first stab at building a bounding-box style collision detection rule for d3V4 forceSimulation. Bounding box is a rule that produces a top-left and bottom right corner with coordinates local to the center of the node. So, in this case the size of the bounding box is fixed at a height of 20px offset by 10px and a variable width based on the length of the label of the node.

Source code here

index.html

d3-force.js

hasse_boole.csv