Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
S
Stable Diffusion Webui
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
novelai-storage
Stable Diffusion Webui
Commits
dbb10fbd
Commit
dbb10fbd
authored
Oct 01, 2023
by
Won-Kyu Park
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
show the preview image in the modalview if available
parent
7d60076b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
javascript/imageviewer.js
javascript/imageviewer.js
+5
-2
No files found.
javascript/imageviewer.js
View file @
dbb10fbd
...
@@ -33,8 +33,11 @@ function updateOnBackgroundChange() {
...
@@ -33,8 +33,11 @@ function updateOnBackgroundChange() {
const
modalImage
=
gradioApp
().
getElementById
(
"
modalImage
"
);
const
modalImage
=
gradioApp
().
getElementById
(
"
modalImage
"
);
if
(
modalImage
&&
modalImage
.
offsetParent
)
{
if
(
modalImage
&&
modalImage
.
offsetParent
)
{
let
currentButton
=
selected_gallery_button
();
let
currentButton
=
selected_gallery_button
();
let
preview
=
gradioApp
().
querySelectorAll
(
'
.livePreview > img
'
);
if
(
currentButton
?.
children
?.
length
>
0
&&
modalImage
.
src
!=
currentButton
.
children
[
0
].
src
)
{
if
(
preview
.
length
>
0
)
{
// show preview image if available
modalImage
.
src
=
preview
[
preview
.
length
-
1
].
src
;
}
else
if
(
currentButton
?.
children
?.
length
>
0
&&
modalImage
.
src
!=
currentButton
.
children
[
0
].
src
)
{
modalImage
.
src
=
currentButton
.
children
[
0
].
src
;
modalImage
.
src
=
currentButton
.
children
[
0
].
src
;
if
(
modalImage
.
style
.
display
===
'
none
'
)
{
if
(
modalImage
.
style
.
display
===
'
none
'
)
{
const
modal
=
gradioApp
().
getElementById
(
"
lightboxModal
"
);
const
modal
=
gradioApp
().
getElementById
(
"
lightboxModal
"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment