(a: Box, b: Box, pad: number)
| 123 | type Box = { x: number; y: number; w: number; h: number; id: string }; |
| 124 | |
| 125 | function 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 | |
| 134 | function resolveOverlaps( |
| 135 | nodes: FlowNode[], |
no outgoing calls
no test coverage detected