MCPcopy Create free account
hub / github.com/ScaleML/AgentSPEX / getBox

Function getBox

yaml-flow-editor/src/utils/layout.ts:144–147  ·  view source on GitHub ↗
(n: FlowNode)

Source from the content-addressed store, hash-verified

142 const out = nodes.map((n) => ({ ...n, position: { ...n.position } }));
143
144 const getBox = (n: FlowNode): Box => {
145 const dim = nodeDimensions.get(n.id) || { width: DEFAULT_NODE_WIDTH, height: DEFAULT_NODE_HEIGHT };
146 return { id: n.id, x: n.position.x, y: n.position.y, w: dim.width, h: dim.height };
147 };
148
149 // We only push nodes "forward" (down in TB, right in LR) to preserve flow direction.
150 const maxIters = 10;

Callers 1

resolveOverlapsFunction · 0.85

Calls 1

getMethod · 0.80

Tested by

no test coverage detected