MCPcopy
hub / github.com/simstudioai/sim / prepareBlockMetrics

Function prepareBlockMetrics

apps/sim/lib/workflows/autolayout/utils.ts:285–289  ·  view source on GitHub ↗
(nodes: Map<string, GraphNode>)

Source from the content-addressed store, hash-verified

283 * Prepares metrics for all nodes in a graph
284 */
285export function prepareBlockMetrics(nodes: Map<string, GraphNode>): void {
286 for (const node of nodes.values()) {
287 node.metrics = getBlockMetrics(node.block)
288 }
289}
290
291/**
292 * Creates a bounding box from position and dimensions

Callers 1

layoutBlocksCoreFunction · 0.90

Calls 1

getBlockMetricsFunction · 0.85

Tested by

no test coverage detected