mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2025-05-06 11:59:06 +08:00
Fix modal live preview not updating
Due to the behavior of scheduleAfterUiUpdateCallbacks if opts.live_preview_refresh_period < 200ms live preview in Modal image viewer may not update Assing updateModalImageIfVisible as alias for updateOnBackgroundChange as the origin name is too generic
This commit is contained in:
parent
017ced6faa
commit
42075971ce
@ -88,6 +88,7 @@ module.exports = {
|
||||
// imageviewer.js
|
||||
modalPrevImage: "readonly",
|
||||
modalNextImage: "readonly",
|
||||
updateModalImageIfVisible: "readonly",
|
||||
// localStorage.js
|
||||
localSet: "readonly",
|
||||
localGet: "readonly",
|
||||
|
@ -54,6 +54,7 @@ function updateOnBackgroundChange() {
|
||||
updateModalImage();
|
||||
}
|
||||
}
|
||||
const updateModalImageIfVisible = updateOnBackgroundChange;
|
||||
|
||||
function modalImageSwitch(offset) {
|
||||
var galleryButtons = all_gallery_buttons();
|
||||
|
@ -190,7 +190,7 @@ function requestProgress(id_task, progressbarContainer, gallery, atEnd, onProgre
|
||||
livePreview.className = 'livePreview';
|
||||
gallery.insertBefore(livePreview, gallery.firstElementChild);
|
||||
}
|
||||
|
||||
updateModalImageIfVisible();
|
||||
livePreview.appendChild(img);
|
||||
if (livePreview.childElementCount > 2) {
|
||||
livePreview.removeChild(livePreview.firstElementChild);
|
||||
|
Loading…
x
Reference in New Issue
Block a user