Commit c84eef81 authored by ruocaled's avatar ruocaled Committed by AUTOMATIC1111

fix observer disconnect logic

parent 6b5c54c1
...@@ -42,7 +42,6 @@ function check_progressbar(id_part, id_progressbar, id_progressbar_span, id_skip ...@@ -42,7 +42,6 @@ function check_progressbar(id_part, id_progressbar, id_progressbar_span, id_skip
skip.style.display = "none" skip.style.display = "none"
} }
interrupt.style.display = "none" interrupt.style.display = "none"
}
//disconnect observer once generation finished, so user can close selected image if they want //disconnect observer once generation finished, so user can close selected image if they want
if (galleryObservers[id_gallery]) { if (galleryObservers[id_gallery]) {
...@@ -51,6 +50,9 @@ function check_progressbar(id_part, id_progressbar, id_progressbar_span, id_skip ...@@ -51,6 +50,9 @@ function check_progressbar(id_part, id_progressbar, id_progressbar_span, id_skip
} }
} }
}
window.setTimeout(function() { requestMoreProgress(id_part, id_progressbar_span, id_skip, id_interrupt) }, 500) window.setTimeout(function() { requestMoreProgress(id_part, id_progressbar_span, id_skip, id_interrupt) }, 500)
}); });
mutationObserver.observe( progressbar, { childList:true, subtree:true }) mutationObserver.observe( progressbar, { childList:true, subtree:true })
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment