提交 bf1f3b8d 编写于 作者: D DepFA 提交者: AUTOMATIC1111

Rely on opts being pre-populated

上级 86021511
......@@ -97,19 +97,12 @@ function galleryImageHandler(e){
}
onUiUpdate(function(){
fullImg_preview = gradioApp().querySelectorAll('img.w-full')
if(fullImg_preview != null){
fullImg_preview.forEach(galleryImageHandler);
}
if(Object.keys(opts).length != 0) return;
json_elem = gradioApp().getElementById('settings_json')
if(json_elem == null) return;
fullImg_preview = gradioApp().querySelectorAll('img.w-full')
if(fullImg_preview != null){
fullImg_preview.forEach(galleryImageHandler);
}
textarea = json_elem.querySelector('textarea')
jsdata = textarea.value
opts = JSON.parse(jsdata)
if(Object.keys(opts).length == 0) return;
if(!window.lightbox_settings_applied){
window.lightbox_settings_applied = true;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册