Commit 9e737cba authored by Alexandre Simard's avatar Alexandre Simard

Solve issue #962

Fix by @MrAcademy
parent 78d6aef3
...@@ -20,3 +20,4 @@ __pycache__ ...@@ -20,3 +20,4 @@ __pycache__
/interrogate /interrogate
/user.css /user.css
/.idea /.idea
/SwinIR
// various functions for interation with ui.py not large enough to warrant putting them in separate files // various functions for interation with ui.py not large enough to warrant putting them in separate files
function selected_gallery_index(){ function selected_gallery_index(){
var gr = gradioApp() var buttons = gradioApp().querySelectorAll('[style="display: block;"].tabitem .gallery-item')
var buttons = gradioApp().querySelectorAll(".gallery-item") var button = gradioApp().querySelector('[style="display: block;"].tabitem .gallery-item.\\!ring-2')
var button = gr.querySelector(".gallery-item.\\!ring-2")
var result = -1 var result = -1
buttons.forEach(function(v, i){ if(v==button) { result = i } }) buttons.forEach(function(v, i){ if(v==button) { result = i } })
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment