From 2fa249a7a973847f116da78fb07053bdca95218f Mon Sep 17 00:00:00 2001 From: Tindleroot Date: Wed, 4 Mar 2026 13:24:43 -0800 Subject: [PATCH] Modify canvas update to round newWidth and newHeight to nearest integer to prevent canvas shrink --- resources/js/scoutingPASS.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/js/scoutingPASS.js b/resources/js/scoutingPASS.js index ca83ba4bd..befb9fdda 100644 --- a/resources/js/scoutingPASS.js +++ b/resources/js/scoutingPASS.js @@ -1114,8 +1114,8 @@ function drawFields(name) { var imgWidth = img.width; var imgHeight = img.height; let scale_factor = Math.min(ctx.canvas.width / img.width, ctx.canvas.height / img.height); - let newWidth = img.width * scale_factor; - let newHeight = img.height * scale_factor; + let newWidth = Math.round(img.width * scale_factor); + let newHeight = Math.round(img.height * scale_factor); if (newWidth > 0) { ctx.canvas.width = newWidth }