Fix image viewer

Short click (<100 ms) will keep the image open.
Click and hold will close the image after the mouse button is released.
Click, hold and move mouse won't close the image.
No changes regarding mobile, it will still need work in that regard.
This commit is contained in:
Kubuxu
2023-07-08 22:10:21 +01:00
parent abd12bbcae
commit 3ca3964171
2 changed files with 28 additions and 13 deletions
+8 -5
View File
@@ -391,7 +391,7 @@ div#extras_scale_to_tab div.form{
background-color: rgba(20, 20, 20, 0.95);
user-select: none;
-webkit-user-select: none;
flex-direction: column;
flex-direction: row;
}
.modalControls {
@@ -420,14 +420,18 @@ div#extras_scale_to_tab div.form{
color: #999;
text-decoration: none;
}
#lightboxModal > img {
.lightboxModalPreviewZone {
display: flex;
width: 100%;
height: 100%;
}
.lightboxModalPreviewZone > img {
display: block;
margin: auto;
width: auto;
}
#lightboxModal > img.modalImageFullscreen{
.lightboxModalPreviewZone > img.modalImageFullscreen{
object-fit: contain;
height: 100%;
width: 100%;
@@ -450,7 +454,6 @@ table.settings-value-table td{
.modalPrev, .modalNext {
cursor: pointer;
position: absolute;
top: 0;
width: auto;
height: 100vh;