diff options
author | DepFA <35278260+dfaker@users.noreply.github.com> | 2022-09-17 17:03:52 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-17 17:03:52 +0000 |
commit | f9cae046cb0a676efeda2577761474e58c27abed (patch) | |
tree | 5c89cef5f72d1f8beb8d720704bb844dc4604845 | |
parent | 0e5527b4df6199d52aa6a424dcf95954cfd87d1f (diff) | |
download | stable-diffusion-webui-gfx803-f9cae046cb0a676efeda2577761474e58c27abed.tar.gz stable-diffusion-webui-gfx803-f9cae046cb0a676efeda2577761474e58c27abed.tar.bz2 stable-diffusion-webui-gfx803-f9cae046cb0a676efeda2577761474e58c27abed.zip |
typo
-rw-r--r-- | script.js | 27 |
1 files changed, 27 insertions, 0 deletions
@@ -133,6 +133,33 @@ function modalKeyHandler(event){ } } +function showGalleryImage(){ + setTimeout(function() { + fullImg_preview = gradioApp().querySelectorAll('img.w-full.object-contain') + + if(fullImg_preview != null){ + fullImg_preview.forEach(function function_name(e) { + if(e && e.parentElement.tagName == 'DIV'){ + + e.style.cursor='pointer' + + e.addEventListener('click', function (evt) { + showModal(evt) + + },true); + } + }); + } + + }, 100); +} + +function galleryImageHandler(e){ + if(e && e.parentElement.tagName == 'BUTTON'){ + e.onclick = showGalleryImage; + } +} + function addTitles(root){ root.querySelectorAll('span, button, select').forEach(function(span){ tooltip = titles[span.textContent]; |