aboutsummaryrefslogtreecommitdiff
path: root/javascript
diff options
context:
space:
mode:
authorAUTOMATIC1111 <16777216c@gmail.com>2023-12-14 09:59:48 +0300
committerGitHub <noreply@github.com>2023-12-14 09:59:48 +0300
commitd45f790f583f84d338cda4d6951ad8bd4a548008 (patch)
tree1f5270dc957867f53601313d0210cd0b5dbb75ec /javascript
parent8c32594d3ba74a599727486ecfa7dc52b7713d37 (diff)
parent9d2cbf8e97832662e446145d3961c39e78919d3d (diff)
Merge pull request #14230 from AUTOMATIC1111/add-option-Live-preview-in-full-page-image-viewer
add option: Live preview in full page image viewer
Diffstat (limited to 'javascript')
-rw-r--r--javascript/imageviewer.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/javascript/imageviewer.js b/javascript/imageviewer.js
index e4dae91b..625c5d14 100644
--- a/javascript/imageviewer.js
+++ b/javascript/imageviewer.js
@@ -34,7 +34,7 @@ function updateOnBackgroundChange() {
if (modalImage && modalImage.offsetParent) {
let currentButton = selected_gallery_button();
let preview = gradioApp().querySelectorAll('.livePreview > img');
- if (preview.length > 0) {
+ if (opts.js_live_preview_in_modal_lightbox && preview.length > 0) {
// show preview image if available
modalImage.src = preview[preview.length - 1].src;
} else if (currentButton?.children?.length > 0 && modalImage.src != currentButton.children[0].src) {