From f55e0fc9634e17c89900d57859daff4430a06690 Mon Sep 17 00:00:00 2001 From: javl Date: Fri, 14 Aug 2026 15:41:42 +0200 Subject: [PATCH] Fix error with width/height input using local this --- js/script.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/script.js b/js/script.js index 591491b..74042d6 100644 --- a/js/script.js +++ b/js/script.js @@ -779,7 +779,7 @@ function handleImageSelection(evt) { w.value = img.width; settings.screenWidth = img.width; w.oninput = () => { - canvas.width = this.value; + canvas.width = w.value; updateAllImages(); updateInteger('screenWidth'); }; @@ -793,7 +793,7 @@ function handleImageSelection(evt) { h.value = img.height; settings.screenHeight = img.height; h.oninput = () => { - canvas.height = this.value; + canvas.height = h.value; updateAllImages(); updateInteger('screenHeight'); };