MCPcopy Create free account
hub / github.com/pgadmin-org/pgadmin4 / isWithinDisplayBounds

Function isWithinDisplayBounds

runtime/src/js/pgadmin.js:124–136  ·  view source on GitHub ↗
(pos)

Source from the content-addressed store, hash-verified

122// pgAdmin tried to open the window on the display where the it
123// was last closed.
124function isWithinDisplayBounds(pos) {
125 const displays = screen.getAllDisplays();
126 return displays.reduce((result, display) => {
127 const area = display.workArea;
128 return (
129 result ||
130 (pos.x >= area.x &&
131 pos.y >= area.y &&
132 pos.x < area.x + area.width &&
133 pos.y < area.y + area.height)
134 );
135 }, false);
136}
137
138function openConfigure() {
139 if (configureWindow === null || configureWindow?.isDestroyed()) {

Callers 1

launchPgAdminWindowFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected