This commit is contained in:
@@ -52,27 +52,29 @@ export const animateIn = scope => {
|
|||||||
|
|
||||||
// Reveal on scroll
|
// Reveal on scroll
|
||||||
let visible = false
|
let visible = false
|
||||||
const carouselReveal = ScrollOut({
|
requestAnimationFrame(() => {
|
||||||
once: true,
|
const carouselReveal = ScrollOut({
|
||||||
targets: scope,
|
once: true,
|
||||||
onChange: (el, ctx) => {
|
targets: scope,
|
||||||
requestAnimationFrame(() => {
|
onChange: (el, ctx) => {
|
||||||
if (ctx.visible === 0) {
|
requestAnimationFrame(() => {
|
||||||
visible = true
|
if (ctx.visible === 0) {
|
||||||
}
|
visible = true
|
||||||
})
|
}
|
||||||
},
|
})
|
||||||
onShown: (el, ctx) => {
|
},
|
||||||
requestAnimationFrame(() => {
|
onShown: (el, ctx) => {
|
||||||
// If revealed on scroll, no delay
|
requestAnimationFrame(() => {
|
||||||
if (visible) {
|
// If revealed on scroll, no delay
|
||||||
tl.restart()
|
if (visible) {
|
||||||
}
|
tl.restart()
|
||||||
// If revealed on load, add a delay
|
}
|
||||||
else {
|
// If revealed on load, add a delay
|
||||||
setTimeout(() => tl.restart(), animDelay * 2)
|
else {
|
||||||
}
|
setTimeout(() => tl.restart(), animDelay * 2)
|
||||||
})
|
}
|
||||||
}
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user