When zooming, only show one copy of the image

Don't add a copy of the image for each live preview image shown
This commit is contained in:
JeLuF 2023-03-16 00:08:24 +01:00
parent a0f2097b1b
commit db769dd995

View File

@ -322,15 +322,15 @@ function showImages(reqBody, res, outputContainer, livePreview) {
imageModal(this.src)
})
const imageInfo = imageItemElem.querySelector('.imgItemInfo')
imageInfo.style.visibility = (livePreview ? 'hidden' : 'visible')
if ('seed' in result && !imageElem.hasAttribute('data-seed')) {
const imageExpandBtn = imageItemElem.querySelector('.imgExpandBtn')
imageExpandBtn.addEventListener('click', function() {
imageModal(imageElem.src)
})
const imageInfo = imageItemElem.querySelector('.imgItemInfo')
imageInfo.style.visibility = (livePreview ? 'hidden' : 'visible')
if ('seed' in result && !imageElem.hasAttribute('data-seed')) {
const req = Object.assign({}, reqBody, {
seed: result?.seed || reqBody.seed
})