Make Location hover preview images global on env
This commit is contained in:
@@ -36,7 +36,7 @@
|
||||
}))
|
||||
|
||||
// Change photo index from mouse position percentage
|
||||
photoIndex = Math.round(lerp(0, 3, moveProgress))
|
||||
photoIndex = Math.round(lerp(0, Number(import.meta.env.VITE_PREVIEW_COUNT) - 1, moveProgress))
|
||||
}
|
||||
|
||||
// Leaving mouseover
|
||||
@@ -76,7 +76,8 @@
|
||||
{#each location.photos as photo, index}
|
||||
<Image
|
||||
class={index === photoIndex ? 'is-visible' : null}
|
||||
id={photo.image.id} alt={photo.image.title} width={240} height={160} quality={70}
|
||||
id={photo.image.id} alt={photo.image.title}
|
||||
width={340} height={226} quality={70}
|
||||
/>
|
||||
{/each}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user