update image on toggle

This commit is contained in:
w-e-w 2025-04-24 01:44:53 +09:00
parent 42075971ce
commit f97f5c1c31
No known key found for this signature in database
GPG Key ID: 52CFE43196F6280E

View File

@ -165,6 +165,7 @@ function modalLivePreviewToggle(event) {
const modalToggleLivePreview = gradioApp().getElementById("modal_toggle_live_preview"); const modalToggleLivePreview = gradioApp().getElementById("modal_toggle_live_preview");
opts.js_live_preview_in_modal_lightbox = !opts.js_live_preview_in_modal_lightbox; opts.js_live_preview_in_modal_lightbox = !opts.js_live_preview_in_modal_lightbox;
modalToggleLivePreview.innerHTML = opts.js_live_preview_in_modal_lightbox ? "🗇" : "🗆"; modalToggleLivePreview.innerHTML = opts.js_live_preview_in_modal_lightbox ? "🗇" : "🗆";
updateModalImageIfVisible();
event.stopPropagation(); event.stopPropagation();
} }