1000ship / react-scroll-motion

🎞 Easy to make scroll animation
https://1000ship.github.io/react-scroll-motion
MIT License
422 stars 47 forks source link

Unable to scrollTo elements that have been faded out. #5

Open devluked opened 3 years ago

devluked commented 3 years ago

Hello,

I have 3 scrollPages and 2 of them end up with the property display: none when they are out of focus. However, when I attempt to have my navbar scroll to these elements, it won't scroll up and I'm pretty sure it is because their display is none. Is there anyway to overwrite the display and just leave the opacity at 0 when I'm not scrolled to the element?

1000ship commented 3 years ago

Could you share me your code if it's okay? That problem code will be helpful when I fix it

devluked commented 3 years ago

Hi 1000ship, the animation is in this file here: https://github.com/devluked/sass-personal-site/blob/main/src/Page.js. I found that when I went into the code and changed the display: none in the animation.ts, to display: initial it works. I'm going to try and fork and reinstall it to get it to work.

devluked commented 3 years ago

Hi 1000ship, I actually forked your repository and changed the code in animation.ts to be display: "initial" so it works properly now.

1000ship commented 3 years ago

@devluked So good! I'm sorry to everyone made issue to my repo. I'm busy to fix bugs, nowadays. I'll check your forked soon. If you can send me PR, It's more comfortable to me. Thanks!