diff --git a/index.js b/index.js index 1a8f23e..943b070 100644 --- a/index.js +++ b/index.js @@ -35,10 +35,6 @@ function createWindow() { board.setResizable(false); setTimeout(() => { - board.setPosition( - Math.min(...screen.getAllDisplays().map((j) => j.workArea.x)), - Math.min(...screen.getAllDisplays().map((j) => j.workArea.y)) - ); board.setSize( Math.max( ...screen @@ -51,7 +47,11 @@ function createWindow() { .map((j) => j.workArea.y + j.workArea.height) ) - Math.min(...screen.getAllDisplays().map((j) => j.workArea.y)) ); - }, 100); + board.setPosition( + Math.min(...screen.getAllDisplays().map((j) => j.workArea.x)), + Math.min(...screen.getAllDisplays().map((j) => j.workArea.y)) + ); + }, 10); const controller = new BrowserWindow({ width: Math.floor( diff --git a/scripts/board.js b/scripts/board.js index 73d7d05..a7acf16 100644 --- a/scripts/board.js +++ b/scripts/board.js @@ -1,5 +1,5 @@ const Konva = require("konva"); - +console.log(window.innerWidth); const stage = new Konva.Stage({ container: "container", width: window.innerWidth,