MCPcopy Create free account
hub / github.com/bearlyai/OpenADE / defaultExecutorBounds

Function defaultExecutorBounds

projects/electron/src/executor.ts:66–74  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

64}
65
66export const defaultExecutorBounds = (): Rectangle => {
67 const currentDisplay = screen.getDisplayNearestPoint(screen.getCursorScreenPoint())
68 const heightRatio = 0.8
69 const width = Math.floor(Math.min(1000, 0.9 * currentDisplay.bounds.width))
70 const height = Math.floor(Math.min(800, currentDisplay.bounds.height * heightRatio))
71 const x = Math.floor(currentDisplay.bounds.x + (currentDisplay.bounds.width - width) / 2)
72 const y = Math.floor(currentDisplay.bounds.y + (currentDisplay.bounds.height - height) / 2)
73 return { x, y, height, width }
74}
75
76const loadLastWindowSize = (): Rectangle => {
77 try {

Callers 2

loadFunction · 0.90
loadLastWindowSizeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected