From 087113d8a1214ba4c7df03bfe66747d8d944280c Mon Sep 17 00:00:00 2001 From: Markus Hatvan Date: Tue, 14 Sep 2021 11:03:28 +0200 Subject: chore: convert JS to TS (#1934) --- src/electron/windowUtils.js | 11 ----------- 1 file changed, 11 deletions(-) delete mode 100644 src/electron/windowUtils.js (limited to 'src/electron/windowUtils.js') diff --git a/src/electron/windowUtils.js b/src/electron/windowUtils.js deleted file mode 100644 index 23b946ac4..000000000 --- a/src/electron/windowUtils.js +++ /dev/null @@ -1,11 +0,0 @@ -/* eslint import/prefer-default-export: 0 */ - -import { screen } from 'electron'; - -export function isPositionValid(position) { - const displays = screen.getAllDisplays(); - const { x, y } = position; - return displays.some(({ - workArea, - }) => x >= workArea.x && x <= workArea.x + workArea.width && y >= workArea.y && y <= workArea.y + workArea.height); -} -- cgit v1.2.3-70-g09d2