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

@@ -9,7 +9,7 @@
export let photo
export let index
export let layout = 'list'
let photoElement
let scope
// Default size for the image
const defaultWidth = 900
@@ -25,6 +25,7 @@
** Run code on browser only
*/
onMount(() => {
animateIn(scope)
// Parallax on photo when the image has been loaded
// const parallaxNumber = basicScroll.default.create({
// elem: photoElement.querySelector('.photo__number'),
@@ -48,6 +49,7 @@
bind:this={photoElement}
in:fly="{{ y: 40, duration: 1000, easing: quartOut }}"
>
<div class="photo" bind:this={scope}>
<div class="photo__location wrap">
<div class="wrapper">
<h2 class="title-location">{photo.name.replace(', ', ',\n')}</h2>