Skip to content

Commit

Permalink
Set window size using javascript
Browse files Browse the repository at this point in the history
Default option supplied to "createBrowserWindow" is not working..
  • Loading branch information
tarzzz committed Sep 23, 2019
1 parent f294d69 commit 132c944
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/component/plotly-dash-preview/render.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ function render (info, opts, sendToMain) {
// Clear cookies before loading URL
session.clearStorageData({}, () => {
win.loadURL(info.url)
win.webContents.executeJavaScript(`window.resizeTo(${windowOpts.width}, ${windowOpts.height})`)
})

const done = errorCode => {
Expand Down

0 comments on commit 132c944

Please sign in to comment.