Skip to content

Commit

Permalink
fix wasm example
Browse files Browse the repository at this point in the history
  • Loading branch information
38 committed Aug 29, 2020
1 parent b9d25de commit 7d5bab3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/wasm-demo/www/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ function setupCanvas() {
const dpr = window.devicePixelRatio || 1.0;
const aspectRatio = canvas.width / canvas.height;
const size = canvas.parentNode.offsetWidth * 0.8;
canvas.style.width = size * dpr + "px";
canvas.style.height = size * dpr / aspectRatio + "px";
canvas.style.width = size + "px";
canvas.style.height = size / aspectRatio + "px";
canvas.width = size;
canvas.height = size / aspectRatio;
updatePlot();
Expand Down

0 comments on commit 7d5bab3

Please sign in to comment.