fix: prevent scroll reveal elements from flashing
This commit is contained in:
@@ -79,7 +79,8 @@ export const MotionController = () => {
|
||||
};
|
||||
}
|
||||
|
||||
const initialRevealBoundary = window.innerHeight * 0.92;
|
||||
// Never hide content that was already painted inside the viewport.
|
||||
const initialRevealBoundary = window.innerHeight;
|
||||
elements.forEach((element) => {
|
||||
const bounds = element.getBoundingClientRect();
|
||||
if (bounds.top <= initialRevealBoundary && bounds.bottom >= 0) {
|
||||
@@ -105,6 +106,7 @@ export const MotionController = () => {
|
||||
{
|
||||
duration: 600,
|
||||
delay: Math.min(siblingIndex * 50, 250),
|
||||
fill: 'backwards',
|
||||
easing: 'cubic-bezier(0.16, 1, 0.3, 1)',
|
||||
},
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user