(bounds: Rectangle, workArea: Rectangle)
| 26 | } |
| 27 | |
| 28 | function hasVisibleIntersection(bounds: Rectangle, workArea: Rectangle) { |
| 29 | const overlapWidth |
| 30 | = Math.min(bounds.x + bounds.width, workArea.x + workArea.width) |
| 31 | - Math.max(bounds.x, workArea.x) |
| 32 | const overlapHeight |
| 33 | = Math.min(bounds.y + bounds.height, workArea.y + workArea.height) |
| 34 | - Math.max(bounds.y, workArea.y) |
| 35 | |
| 36 | return ( |
| 37 | overlapWidth >= Math.min(80, bounds.width) |
| 38 | && overlapHeight >= Math.min(80, bounds.height) |
| 39 | ) |
| 40 | } |
| 41 | |
| 42 | export function normalizeWindowBounds( |
| 43 | value: unknown, |
no outgoing calls
no test coverage detected