From 2ed29438ee7f238a4de35a4196c070dd17d3b3b9 Mon Sep 17 00:00:00 2001 From: lukas Date: Fri, 17 Jan 2025 03:53:54 +0100 Subject: [PATCH] fix canvas aspect ratio --- observe_main.html | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/observe_main.html b/observe_main.html index ddf31ab..06ce0e2 100644 --- a/observe_main.html +++ b/observe_main.html @@ -388,7 +388,6 @@ scaleY = canvas_draw.height / rect.height; pos.x = (e.clientX - rect.x) * scaleX; pos.y = (e.clientY - rect.y) * scaleY; - console.log(pos); } // the draw function to draw onto canvas @@ -1025,8 +1024,8 @@ canvas.style.aspectRatio = video_aspect; canvas_draw.style.aspectRatio = video_aspect; - canvas_draw.width = canvas_draw.width*5; canvas_draw.height = canvas_draw.height*5; + canvas_draw.width = canvas_draw.height*video_aspect; streaming = true; } },