Better animations on opening images in Photoswipe

This commit is contained in:
Алексей Ермолаев 2023-07-21 17:06:24 +03:00
parent 5557836f61
commit 40350c5eab
3 changed files with 9 additions and 4 deletions

View file

@ -68,14 +68,16 @@ onMounted(() => {
canvas,
img {
display: block;
width: 100%;
height: 100%;
max-width: 100%;
max-height: 100%;
}
canvas {
position: absolute;
inset: 0;
object-fit: cover;
width: 100%;
height: 100%;
}
img {

View file

@ -202,7 +202,7 @@ watch(
}
> a {
display: block;
display: flex;
cursor: zoom-in;
overflow: hidden;
width: 100%;
@ -211,6 +211,9 @@ watch(
background-size: contain;
background-repeat: no-repeat;
box-sizing: border-box;
justify-content: center;
align-items: center;
&:focus-visible {
border: 2px solid var(--accent);
}

View file

@ -75,7 +75,7 @@ onMounted(() => {
}),
gallery: gallery.value,
children: ".image",
thumbSelector: ".image",
thumbSelector: ".image img",
loop: false,
padding:
window.innerWidth > 500