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

Function boxesOverlap

apps/sim/lib/workflows/autolayout/utils.ts:309–316  ·  view source on GitHub ↗
(box1: BoundingBox, box2: BoundingBox, margin = 0)

Source from the content-addressed store, hash-verified

307 * Checks if two bounding boxes overlap (with optional margin)
308 */
309export function boxesOverlap(box1: BoundingBox, box2: BoundingBox, margin = 0): boolean {
310 return !(
311 box1.x + box1.width + margin <= box2.x ||
312 box2.x + box2.width + margin <= box1.x ||
313 box1.y + box1.height + margin <= box2.y ||
314 box2.y + box2.height + margin <= box1.y
315 )
316}
317
318/**
319 * Resolves the on-canvas dimensions of a note block.

Callers 2

resolveNoteOverlapsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected