Fix Carousel disappearing?
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2020-04-23 19:11:11 +02:00
parent c43b888d25
commit b5a00cd171
2 changed files with 3 additions and 4681 deletions

View File

@@ -52,7 +52,7 @@ export const animateIn = scope => {
// Reveal on scroll
let visible = false
requestAnimationFrame(() => {
setTimeout(() => {
const carouselReveal = ScrollOut({
once: true,
targets: scope,
@@ -64,7 +64,7 @@ export const animateIn = scope => {
onShown: (el, ctx) => {
// If revealed on scroll, no delay
if (visible) {
requestAnimationFrame(() => tl.restart())
setTimeout(() => tl.restart(), 10)
}
// If revealed on load, add a delay
else {
@@ -72,5 +72,5 @@ export const animateIn = scope => {
}
}
})
})
}, 10)
}