diff options
author | innovaciones <sonygarcia99@gmail.com> | 2022-09-20 18:05:25 +0000 |
---|---|---|
committer | AUTOMATIC1111 <16777216c@gmail.com> | 2022-09-22 05:12:10 +0000 |
commit | f183e09fcc17ee28c2ede2c5f0506c630d79486e (patch) | |
tree | d5f21fde9996df567783e83d0b806d52b4018d5a | |
parent | 3eaae8ae655346c8c510b677bd48021b86842561 (diff) | |
download | stable-diffusion-webui-gfx803-f183e09fcc17ee28c2ede2c5f0506c630d79486e.tar.gz stable-diffusion-webui-gfx803-f183e09fcc17ee28c2ede2c5f0506c630d79486e.tar.bz2 stable-diffusion-webui-gfx803-f183e09fcc17ee28c2ede2c5f0506c630d79486e.zip |
Fix progress bar position
-rw-r--r-- | javascript/progressbar.js | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/javascript/progressbar.js b/javascript/progressbar.js index 065f259b..0f33851f 100644 --- a/javascript/progressbar.js +++ b/javascript/progressbar.js @@ -4,6 +4,7 @@ global_progressbar = null onUiUpdate(function(){ progressbar = gradioApp().getElementById('progressbar') + progressDiv = gradioApp().querySelectorAll('.progressDiv').length > 0; if(progressbar!= null && progressbar != global_progressbar){ global_progressbar = progressbar @@ -16,12 +17,18 @@ onUiUpdate(function(){ if(txt2img_preview != null && txt2img_gallery != null){ txt2img_preview.style.width = txt2img_gallery.clientWidth + "px" - txt2img_preview.style.height = txt2img_gallery.clientHeight + "px" + txt2img_preview.style.height = txt2img_gallery.clientHeight + "px" + if(!progressDiv){ + progressbar.style.display = "none" + } } if(img2img_preview != null && img2img_gallery != null){ img2img_preview.style.width = img2img_gallery.clientWidth + "px" - img2img_preview.style.height = img2img_gallery.clientHeight + "px" + img2img_preview.style.height = img2img_gallery.clientHeight + "px" + if(!progressDiv){ + progressbar.style.display = "none" + } } window.setTimeout(requestMoreProgress, 500) @@ -35,6 +42,10 @@ function requestMoreProgress(){ if(btn==null) return; btn.click(); + progressDiv = gradioApp().querySelectorAll('.progressDiv').length > 0; + if(progressDiv){ + progressbar.style.display = "block" + } } function requestProgress(){ @@ -43,4 +54,3 @@ function requestProgress(){ btn.click(); } - |