-
Notifications
You must be signed in to change notification settings - Fork 17.1k
BrowserWindow.setBounds() typeError #9552
Copy link
Copy link
Closed
Description
- Electron version: 1.6.8
- Operating system: Windows 10
Expected behavior
When passing in a configuration object {x, y, height, width} to setBounds() I expected BrowserWindow to conform to the given number type dimensions.
Actual behavior
Temporary Fix
When I logged my boundsConfig , terminal displayed:
{ x: 1621.5, y: 611, height: 501, width: 301 }
Every value is a number, however, the value of x was a floating point. I tried Math.round(x) , Math.floor(x) , Math.ceil(x) and that seemed to solve the problem. I also tried adding a literal value of 0.5 to the other variables and the same error was reproduced. Appears that setBounds() does not take floating points.
Reactions are currently unavailable
