mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2025-12-06 02:30:30 -08:00
Use classList.toggle wherever possible
This commit is contained in:
parent
ee973dcf1d
commit
34a6ad80d5
2 changed files with 5 additions and 13 deletions
|
|
@ -1,13 +1,9 @@
|
|||
|
||||
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)
|
||||
}
|
||||
|
||||
hrUpscaleBy = gradioApp().getElementById('txt2img_hr_scale')
|
||||
hrResizeX = gradioApp().getElementById('txt2img_hr_resize_x')
|
||||
hrResizeY = gradioApp().getElementById('txt2img_hr_resize_y')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue