Add a parent to each photo on Viewer
Allows to animate the parent that has no transform/top
This commit is contained in:
@@ -242,18 +242,20 @@
|
||||
<div class="viewer-photo__carousel">
|
||||
<div class="viewer-photo__images" use:swipe on:swipe={handleSwipe} on:tap={toggleFullscreen}>
|
||||
{#each visiblePhotos as photo, index (photo.id)}
|
||||
<Image
|
||||
class="photo photo--{currentIndex === 0 ? index + 1 : index}"
|
||||
id={photo.image.id}
|
||||
alt={photo.title}
|
||||
sizeKey="photo-list"
|
||||
sizes={{
|
||||
small: { width: 500 },
|
||||
medium: { width: 850 },
|
||||
large: { width: 1280 },
|
||||
}}
|
||||
ratio={1.5}
|
||||
/>
|
||||
<div class="viewer-photo__picture is-{currentIndex === 0 ? index + 1 : index}">
|
||||
<Image
|
||||
class="photo"
|
||||
id={photo.image.id}
|
||||
alt={photo.title}
|
||||
sizeKey="photo-list"
|
||||
sizes={{
|
||||
small: { width: 500 },
|
||||
medium: { width: 850 },
|
||||
large: { width: 1280 },
|
||||
}}
|
||||
ratio={1.5}
|
||||
/>
|
||||
</div>
|
||||
{/each}
|
||||
|
||||
<div class="viewer-photo__controls">
|
||||
|
||||
Reference in New Issue
Block a user