Also fix clicks into the image

This commit is contained in:
JeLuF 2023-03-16 00:32:10 +01:00
parent db769dd995
commit aa3bc864ee

View File

@ -318,9 +318,6 @@ function showImages(reqBody, res, outputContainer, livePreview) {
imageElem.addEventListener('load', function() {
imageItemElem.querySelector('.img_bottom_label').innerText = `${this.naturalWidth} x ${this.naturalHeight}`
})
imageElem.addEventListener('click', function() {
imageModal(this.src)
})
const imageInfo = imageItemElem.querySelector('.imgItemInfo')
imageInfo.style.visibility = (livePreview ? 'hidden' : 'visible')
@ -330,6 +327,9 @@ function showImages(reqBody, res, outputContainer, livePreview) {
imageExpandBtn.addEventListener('click', function() {
imageModal(imageElem.src)
})
imageElem.addEventListener('click', function() {
imageModal(this.src)
})
const req = Object.assign({}, reqBody, {
seed: result?.seed || reqBody.seed