Skip to content
Snippets Groups Projects
Verified Commit 1a5172c0 authored by João Magalhães's avatar João Magalhães :rocket:
Browse files

fix: device pixel ratio fix

parent 34bde6ca
No related branches found
No related tags found
1 merge request!2Initial web version of boytacean
......@@ -92,7 +92,7 @@ p {
border: 2px solid #50cb93;
font-size: 0px;
margin-top: 78px;
max-width: 660px;
max-width: 320px;
padding: 8px 8px 8px 8px;
}
......
......@@ -20,7 +20,7 @@
<img class="large" src="res/minimise.svg" alt="minimise" />
</span>
<div class="canvas-frame">
<canvas id="chip-canvas" class="canvas" width="160" height="144"></canvas>
<canvas id="chip-canvas" class="canvas" width="320" height="288"></canvas>
</div>
</div>
</div>
......
......@@ -699,8 +699,8 @@ const clearCanvas = async (
img.src = image;
});
const [imgWidth, imgHeight] = [
img.width * imageScale,
img.height * imageScale
img.width * imageScale * window.devicePixelRatio,
img.height * imageScale * window.devicePixelRatio
];
const [x0, y0] = [
state.canvasScaled.width / 2 - imgWidth / 2,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment