Merge pull request #6756 from Poktay/ar_fix_for_inpaint
Fix Aspect Ratio Overlay / AROverlay to work with Inpaint & Sketch
This commit is contained in:
commit
4d158c1879
1 changed files with 7 additions and 2 deletions
|
@ -21,12 +21,17 @@ function dimensionChange(e, is_width, is_height){
|
||||||
var targetElement = null;
|
var targetElement = null;
|
||||||
|
|
||||||
var tabIndex = get_tab_index('mode_img2img')
|
var tabIndex = get_tab_index('mode_img2img')
|
||||||
if(tabIndex == 0){
|
if(tabIndex == 0){ // img2img
|
||||||
targetElement = gradioApp().querySelector('div[data-testid=image] img');
|
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');
|
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){
|
if(targetElement){
|
||||||
|
|
||||||
var arPreviewRect = gradioApp().querySelector('#imageARPreview');
|
var arPreviewRect = gradioApp().querySelector('#imageARPreview');
|
||||||
|
|
Loading…
Reference in a new issue