We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ca7b10e commit 824fd70Copy full SHA for 824fd70
p5js/js/electron/resizer.js
@@ -7,7 +7,10 @@ const observer = new MutationObserver((mutationList) => {
7
mutation => mutation.addedNodes[0]?.nodeName === "MAIN"
8
).length > 0;
9
if (p5Ready) {
10
- const { width, height } = document.querySelector("canvas");
+ // Choose CSS over device pixels for proper window size across all screens
11
+ const { style } = document.querySelector("canvas");
12
+ const width = parseInt(style.width);
13
+ const height = parseInt(style.height);
14
pde.resize({
15
width,
16
height
0 commit comments