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
|
||||
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)
|
||||
}
|
||||
Reference in New Issue
Block a user