fix all same size btn

This commit is contained in:
javl
2023-05-02 17:56:08 +02:00
parent e3d82fb694
commit 65b3e44888
2 changed files with 3 additions and 2 deletions
+1 -1
View File
@@ -281,7 +281,7 @@
<ul id="image-size-settings"></ul>
<div id="only-images-file-error" class="msg error-msg">Only images file type are allowed</div>
<div id="no-file-selected" class="msg">No files selected</div>
<button id="all-same-size">all same size</button>
<button id="all-same-size">Apply first image size to all images</button>
</div>
</div>
+2 -1
View File
@@ -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)