From 6e05c3927a656693f0a77b8df14cdcb07937c589 Mon Sep 17 00:00:00 2001 From: Raphael Forment Date: Fri, 24 Nov 2023 01:49:21 +0100 Subject: [PATCH] test: lower canvas size --- src/WindowBehavior.ts | 4 ++-- src/main.ts | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/WindowBehavior.ts b/src/WindowBehavior.ts index b5e5a1d..0806a8f 100644 --- a/src/WindowBehavior.ts +++ b/src/WindowBehavior.ts @@ -8,8 +8,8 @@ const handleResize = (canvas: HTMLCanvasElement) => { const dpr = window.devicePixelRatio || 1; // Assuming the canvas takes up the whole window - canvas.width = window.innerWidth * dpr; - canvas.height = window.innerHeight * dpr; + canvas.width = window.innerWidth * dpr * 0.25; + canvas.height = window.innerHeight * dpr * 0.25; if (ctx) { ctx.scale(dpr, dpr); diff --git a/src/main.ts b/src/main.ts index 7f9b249..b314043 100644 --- a/src/main.ts +++ b/src/main.ts @@ -510,11 +510,11 @@ export class Editor { const dpr = window.devicePixelRatio || 1; // Assuming the canvas takes up the whole window - canvas.width = window.innerWidth * dpr; - canvas.height = window.innerHeight * dpr; + canvas.width = window.innerWidth * dpr * 0.25; + canvas.height = window.innerHeight * dpr * 0.25; if (ctx) { - ctx.scale(dpr, dpr); + ctx.scale(dpr * 0.5, dpr * 0.5); } } }