@shumoku/core · 0.4.0 · function
rebalanceSubgraphs
Rebalance the entire layout after any mutation. Uniform algorithm: 1. Recompute subgraph bounds (bottom-up, deepest first) 2. Resolve subgraph vs subgraph sibling collisions 3. Resolve subgraph vs free node collisions (push nodes away)
rebalanceSubgraphs(nodes: Map<string, Node>, subgraphs: Map<string, Subgraph>, ports: Map<string, ResolvedPort>, opts?: { direction?: "TB" | "BT" | "LR" | "RL"; subgraphLabelHeight?: number; subgraphPadding?: number }): void Parameters
| Parameter | Type | Description | Default |
|---|---|---|---|
nodes | Map<string, Node> | No additional description. | — |
subgraphs | Map<string, Subgraph> | No additional description. | — |
ports | Map<string, ResolvedPort> | No additional description. | — |
opts | { direction?: "TB" | "BT" | "LR" | "RL"; subgraphLabelHeight?: number; subgraphPadding?: number } | No additional description. | {} |
Returns
void