MCPcopy Index your code
hub / github.com/massCodeIO/massCode / hasVisibleIntersection

Function hasVisibleIntersection

src/main/windowBounds.ts:28–40  ·  view source on GitHub ↗
(bounds: Rectangle, workArea: Rectangle)

Source from the content-addressed store, hash-verified

26}
27
28function 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
42export function normalizeWindowBounds(
43 value: unknown,

Callers 1

normalizeWindowBoundsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected