I’d like to prevent a specific coordinate area reserved for a legend in my GoJS diagram which is using a ForceDirectedLayout
for node layouts. However, the legend shape doesn’t affect the layout of nodes when applied as a Part
, and using a placeholder Node
unfortunately doesn’t allow placement based on document coordinates.
How can you create a region in a ForceDirectedLayout
which affects nodes as they’re being calculated but in turn either isn’t a node or is a fixed node position without any links?
Ideally it’d be possible to define a specific Rect
in the diagram which isn’t accessible for nodes, but the closest I could find is the total bounding box via boundsComputation
which would just narrow the area and not allow for cutting a specific region out.
Here’s a specific illustration of the challenge, where the legend will generally overlapping with node content without some force to repel the nodes: