@shumoku/core · 0.4.0 · function
moveSubgraph
Move an entire subgraph (bounds + all contents) by delta from its current position. Resolves sibling collisions after the move.
moveSubgraph(sgId: string, x: number, y: number, layout: { nodes: Map<string, Node>; ports: Map<string, ResolvedPort>; subgraphs: Map<string, Subgraph> }, links: Link[], routeFn?: object): Promise<{ edges: Map<string, ResolvedEdge>; nodes: Map<string, Node>; ports: Map<string, ResolvedPort>; subgraphs: Map<string, Subgraph> } | null> Parameters
| Parameter | Type | Description | Default |
|---|---|---|---|
sgId | string | No additional description. | — |
x | number | No additional description. | — |
y | number | No additional description. | — |
layout | { nodes: Map<string, Node>; ports: Map<string, ResolvedPort>; subgraphs: Map<string, Subgraph> } | No additional description. | — |
links | Link[] | No additional description. | — |
routeFn | object | No additional description. | routeEdges |
Returns
Promise<{ edges: Map<string, ResolvedEdge>; nodes: Map<string, Node>; ports: Map<string, ResolvedPort>; subgraphs: Map<string, Subgraph> } | null>