diff options
author | Josh R <josh@joshrubenstein.com> | 2023-01-14 22:45:08 +0000 |
---|---|---|
committer | Josh R <josh@joshrubenstein.com> | 2023-01-14 22:45:08 +0000 |
commit | cbbdfc3609097fb8b31e32387396ee1ae299fc6f (patch) | |
tree | fcf77607bba2954088fbd145353aeab5537cd7e6 | |
parent | ce9827a7c51a9f69bf62c634e35d34fa75ee1833 (diff) | |
download | stable-diffusion-webui-gfx803-cbbdfc3609097fb8b31e32387396ee1ae299fc6f.tar.gz stable-diffusion-webui-gfx803-cbbdfc3609097fb8b31e32387396ee1ae299fc6f.tar.bz2 stable-diffusion-webui-gfx803-cbbdfc3609097fb8b31e32387396ee1ae299fc6f.zip |
Fix Aspect Ratio Overlay / AROverlay to work with Inpaint & Sketch
-rw-r--r-- | javascript/aspectRatioOverlay.js | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/javascript/aspectRatioOverlay.js b/javascript/aspectRatioOverlay.js index 66f26a22..0f164b82 100644 --- a/javascript/aspectRatioOverlay.js +++ b/javascript/aspectRatioOverlay.js @@ -21,11 +21,16 @@ function dimensionChange(e, is_width, is_height){ var targetElement = null;
var tabIndex = get_tab_index('mode_img2img')
- if(tabIndex == 0){
+ if(tabIndex == 0){ // img2img
targetElement = gradioApp().querySelector('div[data-testid=image] img');
- } else if(tabIndex == 1){
+ } else if(tabIndex == 1){ //Sketch
+ targetElement = gradioApp().querySelector('#img2img_sketch div[data-testid=image] img');
+ } else if(tabIndex == 2){ // Inpaint
targetElement = gradioApp().querySelector('#img2maskimg div[data-testid=image] img');
+ } else if(tabIndex == 3){ // Inpaint sketch
+ targetElement = gradioApp().querySelector('#inpaint_sketch div[data-testid=image] img');
}
+
if(targetElement){
|