Fix Carousel disappearing?
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
4678
package-lock.json
generated
4678
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -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)
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user