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

4678
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

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