(layout)
| 66 | |
| 67 | // Check if a layout has any overlaps (ignoring static items overlapping each other) |
| 68 | function hasOverlaps(layout) { |
| 69 | for (let i = 0; i < layout.length; i++) { |
| 70 | for (let j = i + 1; j < layout.length; j++) { |
| 71 | if (collides(layout[i], layout[j])) { |
| 72 | // Allow static items to overlap with each other |
| 73 | if (layout[i].static && layout[j].static) continue; |
| 74 | return true; |
| 75 | } |
| 76 | } |
| 77 | } |
| 78 | return false; |
| 79 | } |
| 80 | |
| 81 | // Measure execution time |
| 82 | function measureTime(fn, iterations = 100) { |
no test coverage detected
searching dependent graphs…