Skip to content

Commit 7d5bab3

Browse files
committed
fix wasm example
1 parent b9d25de commit 7d5bab3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/wasm-demo/www/index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ function setupCanvas() {
3333
const dpr = window.devicePixelRatio || 1.0;
3434
const aspectRatio = canvas.width / canvas.height;
3535
const size = canvas.parentNode.offsetWidth * 0.8;
36-
canvas.style.width = size * dpr + "px";
37-
canvas.style.height = size * dpr / aspectRatio + "px";
36+
canvas.style.width = size + "px";
37+
canvas.style.height = size / aspectRatio + "px";
3838
canvas.width = size;
3939
canvas.height = size / aspectRatio;
4040
updatePlot();

0 commit comments

Comments
 (0)