Scope animations
This commit is contained in:
@@ -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">
|
||||
|
||||
Reference in New Issue
Block a user