fix gallery, update js logging, add en caching

This commit is contained in:
Vladimir Mandic
2023-08-29 14:16:37 -04:00
parent 4bfa2ee877
commit 9e2e2b8b8f
25 changed files with 125 additions and 101 deletions
+2 -2
View File
@@ -4,7 +4,7 @@ function attachGalleryListeners(tab_name) {
const gallery = gradioApp().querySelector(`#${tab_name}_gallery`);
if (!gallery) return null;
gallery.addEventListener('click', () => setTimeout(() => {
console.log('galleryItemSelected:', tab_name);
log('galleryItemSelected:', tab_name);
gradioApp().getElementById(`${tab_name}_generation_info_button`)?.click();
}, 500));
gallery?.addEventListener('keydown', (e) => {
@@ -36,7 +36,7 @@ function initiGenerationParams() {
if (txt2img_gallery && img2img_gallery) generationParamsInitialized = true;
else return;
modalObserver.observe(modal, { attributes: true, attributeFilter: ['style'] });
console.log('initGenerationParams');
log('initGenerationParams');
}
onAfterUiUpdate(initiGenerationParams);