mirror of
https://github.com/javl/image2cpp.git
synced 2026-07-27 19:56:07 +00:00
fix all same size btn
This commit is contained in:
+1
-1
@@ -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>
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user