fix for Gradio 3.39 compatibility
parent
6fe65accb3
commit
65618f3e07
|
|
@ -96,8 +96,10 @@ const image_browser_click_image = async function() {
|
||||||
let child = this
|
let child = this
|
||||||
let index = 0
|
let index = 0
|
||||||
while ((child = child.previousSibling) != null) {
|
while ((child = child.previousSibling) != null) {
|
||||||
|
if (child.nodeType === Node.ELEMENT_NODE) {
|
||||||
index = index + 1
|
index = index + 1
|
||||||
}
|
}
|
||||||
|
}
|
||||||
const set_btn = container.querySelector(".image_browser_set_index")
|
const set_btn = container.querySelector(".image_browser_set_index")
|
||||||
let curr_idx
|
let curr_idx
|
||||||
try {
|
try {
|
||||||
|
|
|
||||||
|
|
@ -997,6 +997,7 @@ def show_image_info(tab_base_tag_box, num, page_index, filenames, turn_page_swit
|
||||||
if opts.image_browser_use_thumbnail:
|
if opts.image_browser_use_thumbnail:
|
||||||
image_gallery = [image['name'] for image in image_gallery]
|
image_gallery = [image['name'] for image in image_gallery]
|
||||||
image_gallery[int(num)] = filenames[file_num]
|
image_gallery[int(num)] = filenames[file_num]
|
||||||
|
if opts.image_browser_use_thumbnail:
|
||||||
return file, tm, num, file, turn_page_switch, info, image_gallery
|
return file, tm, num, file, turn_page_switch, info, image_gallery
|
||||||
else:
|
else:
|
||||||
return file, tm, num, file, turn_page_switch, info
|
return file, tm, num, file, turn_page_switch, info
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue