Skip to content

Commit

Permalink
Merge branch 'refs/heads/pr/imageview-005' into dev-local-202406
Browse files Browse the repository at this point in the history
* refs/heads/pr/imageview-005:
  chore: set image viewer default as modalImageFullscreen
  • Loading branch information
bluelovers committed Jun 11, 2024
2 parents 375fdee + 9eec9bb commit 5e16914
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions javascript/imageviewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ function showModal(event) {
const modalImage = gradioApp().getElementById("modalImage");
const lb = gradioApp().getElementById("lightboxModal");
modalImage.src = source.src;
modalImage.className = 'modalImageFullscreen';
if (modalImage.style.display === 'none') {
lb.style.setProperty('background-image', 'url(' + source.src + ')');
}
Expand Down
6 changes: 3 additions & 3 deletions style.css
Original file line number Diff line number Diff line change
Expand Up @@ -716,10 +716,10 @@ table.popup-table .link{
width: auto;
}

#lightboxModal > img.modalImageFullscreen{
#lightboxModal img#modalImage.modalImageFullscreen {
object-fit: contain;
height: 100%;
width: 100%;
max-height: 100%;
max-width: 100%;
min-height: 0;
}

Expand Down

0 comments on commit 5e16914

Please sign in to comment.