Merge pull request #1019 from JeLuF/zoom

When zooming, only show one copy of the image
This commit is contained in:
cmdr2 2023-03-16 11:47:27 +05:30 committed by GitHub
commit fe23cc558d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -319,15 +319,15 @@ function showImages(reqBody, res, outputContainer, livePreview) {
imageItemElem.querySelector('.img_bottom_label').innerText = `${this.naturalWidth} x ${this.naturalHeight}`
})
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 imageExpandBtn = imageItemElem.querySelector('.imgExpandBtn')
imageExpandBtn.addEventListener('click', function() {
imageModal(imageElem.src)
})
const req = Object.assign({}, reqBody, {
seed: result?.seed || reqBody.seed
})