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

Function boxesOverlap

yaml-flow-editor/src/utils/layout.ts:125–132  ·  view source on GitHub ↗
(a: Box, b: Box, pad: number)

Source from the content-addressed store, hash-verified

123type Box = { x: number; y: number; w: number; h: number; id: string };
124
125function boxesOverlap(a: Box, b: Box, pad: number): boolean {
126 return (
127 a.x < b.x + b.w + pad &&
128 a.x + a.w + pad > b.x &&
129 a.y < b.y + b.h + pad &&
130 a.y + a.h + pad > b.y
131 );
132}
133
134function resolveOverlaps(
135 nodes: FlowNode[],

Callers 3

resolveOverlapsFunction · 0.85
resolveOverlapsForNodeFunction · 0.85
hasAnyOverlapInFlowFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected