(a, b)
| 6 | } |
| 7 | |
| 8 | function rectanglesOverlap(a, b) { |
| 9 | const ax2 = a.x + a.w; |
| 10 | const ay2 = a.y + a.h; |
| 11 | const bx2 = b.x + b.w; |
| 12 | const by2 = b.y + b.h; |
| 13 | return !(ax2 <= b.x || bx2 <= a.x || ay2 <= b.y || by2 <= a.y); |
| 14 | } |
| 15 | |
| 16 | function clampItemToGrid(item, bpCols) { |
| 17 | const clamped = cloneDeep(item); |
no outgoing calls
no test coverage detected