aboutsummaryrefslogtreecommitdiffstats
path: root/javascript/hires_fix.js
diff options
context:
space:
mode:
authorAUTOMATIC <16777216c@gmail.com>2023-05-09 19:42:37 +0000
committerAUTOMATIC <16777216c@gmail.com>2023-05-09 19:42:37 +0000
commitc8791c1d37502f162b8616b066303bfadc4a749b (patch)
tree6843c3505117f26549dfe1dc9cd40aacd5ccdfd3 /javascript/hires_fix.js
parent6fbd85dd0c0dffc06560bff91f4c4b65e441ca5f (diff)
parent31397986e70d20e392d9c3ec70d3aef8ecc2c1ff (diff)
downloadstable-diffusion-webui-gfx803-c8791c1d37502f162b8616b066303bfadc4a749b.tar.gz
stable-diffusion-webui-gfx803-c8791c1d37502f162b8616b066303bfadc4a749b.tar.bz2
stable-diffusion-webui-gfx803-c8791c1d37502f162b8616b066303bfadc4a749b.zip
Merge branch 'dev' into release_candidate
Diffstat (limited to 'javascript/hires_fix.js')
-rw-r--r--javascript/hires_fix.js16
1 files changed, 6 insertions, 10 deletions
diff --git a/javascript/hires_fix.js b/javascript/hires_fix.js
index 0629475f..48196be4 100644
--- a/javascript/hires_fix.js
+++ b/javascript/hires_fix.js
@@ -1,16 +1,12 @@
-function setInactive(elem, inactive){
- if(inactive){
- elem.classList.add('inactive')
- } else{
- elem.classList.remove('inactive')
+function onCalcResolutionHires(enable, width, height, hr_scale, hr_resize_x, hr_resize_y){
+ function setInactive(elem, inactive){
+ elem.classList.toggle('inactive', !!inactive)
}
-}
-function onCalcResolutionHires(enable, width, height, hr_scale, hr_resize_x, hr_resize_y){
- hrUpscaleBy = gradioApp().getElementById('txt2img_hr_scale')
- hrResizeX = gradioApp().getElementById('txt2img_hr_resize_x')
- hrResizeY = gradioApp().getElementById('txt2img_hr_resize_y')
+ var hrUpscaleBy = gradioApp().getElementById('txt2img_hr_scale')
+ var hrResizeX = gradioApp().getElementById('txt2img_hr_resize_x')
+ var hrResizeY = gradioApp().getElementById('txt2img_hr_resize_y')
gradioApp().getElementById('txt2img_hires_fix_row2').style.display = opts.use_old_hires_fix_width_height ? "none" : ""