mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2025-08-03 02:40:37 +00:00
fix Replace preview
fix broken Replace preview for extra networks tabs edit metadata caused by #11808
This commit is contained in:
@@ -26,6 +26,14 @@ function selected_gallery_index() {
|
||||
return all_gallery_buttons().findIndex(elem => elem.classList.contains('selected'));
|
||||
}
|
||||
|
||||
function gallery_container_buttons(gallery_container) {
|
||||
return gradioApp().querySelectorAll(`#${gallery_container} .thumbnail-item.thumbnail-small`);
|
||||
}
|
||||
|
||||
function selected_gallery_index_id(gallery_container) {
|
||||
return Array.from(gallery_container_buttons(gallery_container)).findIndex(elem => elem.classList.contains('selected'));
|
||||
}
|
||||
|
||||
function extract_image_from_gallery(gallery) {
|
||||
if (gallery.length == 0) {
|
||||
return [null];
|
||||
|
Reference in New Issue
Block a user