MCPcopy Index your code
hub / github.com/simstudioai/sim / createBoundingBox

Function createBoundingBox

apps/sim/lib/workflows/autolayout/utils.ts:294–304  ·  view source on GitHub ↗
(
  position: { x: number; y: number },
  dimensions: Pick<BlockMetrics, 'width' | 'height'>
)

Source from the content-addressed store, hash-verified

292 * Creates a bounding box from position and dimensions
293 */
294export function createBoundingBox(
295 position: { x: number; y: number },
296 dimensions: Pick<BlockMetrics, 'width' | 'height'>
297): BoundingBox {
298 return {
299 x: position.x,
300 y: position.y,
301 width: dimensions.width,
302 height: dimensions.height,
303 }
304}
305
306/**
307 * Checks if two bounding boxes overlap (with optional margin)

Callers 2

resolveNoteOverlapsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected