Scope animations

This commit is contained in:
2020-03-10 21:16:21 +01:00
parent c8bc7f39c8
commit a60a67a892
9 changed files with 39 additions and 27 deletions

View File

@@ -18,6 +18,7 @@
export let init = undefined
// Variables
let scope
let hover
let currentIndex = 0
$: currentPhoto = photos[currentIndex] || null
@@ -93,7 +94,7 @@
*/
onMount(() => {
// Entering transition
animateIn()
animateIn(scope)
// Hover function
hover = event => {
@@ -138,6 +139,7 @@
<div class="carousel"
on:touchstart={swipeStart}
on:touchend={swipeEnd}
bind:this={scope}
>
<div class="wrap">
<div class="gallery">