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

Function getBlockMetrics

apps/sim/lib/workflows/autolayout/utils.ts:274–280  ·  view source on GitHub ↗
(block: BlockState)

Source from the content-addressed store, hash-verified

272 * Gets the dimensions and metrics for a block
273 */
274export function getBlockMetrics(block: BlockState): BlockMetrics {
275 if (isContainerType(block.type)) {
276 return getContainerMetrics(block)
277 }
278
279 return getRegularBlockMetrics(block)
280}
281
282/**
283 * Prepares metrics for all nodes in a graph

Callers 11

utils.test.tsFile · 0.90
expectVerticalSeparationFunction · 0.90
targeted.test.tsFile · 0.90
assignLayersFunction · 0.90
prepareBlockMetricsFunction · 0.85
resolveNoteOverlapsFunction · 0.85

Calls 3

getContainerMetricsFunction · 0.85
getRegularBlockMetricsFunction · 0.85
isContainerTypeFunction · 0.70

Tested by 1

expectVerticalSeparationFunction · 0.72