From 65b3e4488854958d290c8f67cab8758c9d01cbe6 Mon Sep 17 00:00:00 2001 From: javl Date: Tue, 2 May 2023 17:56:08 +0200 Subject: [PATCH] fix all same size btn --- index.html | 2 +- script.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index 3cfdfb5..6eed2ee 100644 --- a/index.html +++ b/index.html @@ -281,7 +281,7 @@
Only images file type are allowed
No files selected
- + diff --git a/script.js b/script.js index f175333..360a358 100644 --- a/script.js +++ b/script.js @@ -24,6 +24,7 @@ const settings = { }; let outputString = ''; +let allSameSizeButton; function bitswap(b) { if (settings.bitswap) { @@ -711,7 +712,6 @@ function handleTextInput(drawMode) { } function allSameSize(_images, files) { - const allSameSizeButton = document.getElementById('all-same-size'); if (_images.length() > 1 && _images.length() === files.length) { // multiple images settings container // var imageSizeSettings = document.getElementById("image-size-settings"); @@ -1134,6 +1134,7 @@ window.onload = () => { fileInput.addEventListener('click', () => { this.value = null; }, false); fileInput.addEventListener('change', handleImageSelection, false); + allSameSizeButton = document.getElementById('all-same-size'); // The variable to hold our images. Global so we can easily reuse it when the // user updates the settings (change canvas size, scale, invert, etc)