We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b9d25de commit 7d5bab3Copy full SHA for 7d5bab3
examples/wasm-demo/www/index.js
@@ -33,8 +33,8 @@ function setupCanvas() {
33
const dpr = window.devicePixelRatio || 1.0;
34
const aspectRatio = canvas.width / canvas.height;
35
const size = canvas.parentNode.offsetWidth * 0.8;
36
- canvas.style.width = size * dpr + "px";
37
- canvas.style.height = size * dpr / aspectRatio + "px";
+ canvas.style.width = size + "px";
+ canvas.style.height = size / aspectRatio + "px";
38
canvas.width = size;
39
canvas.height = size / aspectRatio;
40
updatePlot();
0 commit comments