mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Close zoomed image when clicking the parent div instead of image
Makes it easier to close on mobile
This commit is contained in:
@@ -28,7 +28,6 @@
|
|||||||
z-index: 30;
|
z-index: 30;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
right: 0;
|
right: 0;
|
||||||
top: 50px;
|
|
||||||
aspect-ratio: 2 / 3;
|
aspect-ratio: 2 / 3;
|
||||||
width: fit-content;
|
width: fit-content;
|
||||||
max-height: calc(60vh - 60px);
|
max-height: calc(60vh - 60px);
|
||||||
@@ -373,7 +372,6 @@
|
|||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
display: none;
|
display: none;
|
||||||
right: 0;
|
right: 0;
|
||||||
top: 50px;
|
|
||||||
aspect-ratio: 2 / 3;
|
aspect-ratio: 2 / 3;
|
||||||
left: 50%;
|
left: 50%;
|
||||||
transform: translateX(-50%);
|
transform: translateX(-50%);
|
||||||
|
@@ -10241,7 +10241,7 @@ jQuery(async function () {
|
|||||||
if (power_user.zoomed_avatar_magnification)
|
if (power_user.zoomed_avatar_magnification)
|
||||||
$('.zoomed_avatar_container').izoomify();
|
$('.zoomed_avatar_container').izoomify();
|
||||||
|
|
||||||
zoomedAvatarImgElement.on('click', (e) => {
|
$('.zoomed_avatar').on('click', (e) => {
|
||||||
$(`.zoomed_avatar[forChar="${charname}"]`).fadeOut();
|
$(`.zoomed_avatar[forChar="${charname}"]`).fadeOut();
|
||||||
setTimeout(function() { $(`.zoomed_avatar[forChar="${charname}"]`).remove(); }, 410);
|
setTimeout(function() { $(`.zoomed_avatar[forChar="${charname}"]`).remove(); }, 410);
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user