Artleks Posted October 29, 2021 Share Posted October 29, 2021 I have been trying to recreate native ScrollTrigger demo from ScrollTrigger.scrollerProxy() topic, but with some changes to elements generation (the elements need to be generated dynamically). It seems as if changing scroll smoothness does not give any disered effect. Could you please take a look and hint me with the right direction, please? https://stackblitz.com/edit/angular-ivy-rvs5ln?file=src%2Fapp%2Fapp.component.css Link to comment Share on other sites More sharing options...
OSUblake Posted October 29, 2021 Share Posted October 29, 2021 It looks like you changed the smoothScroll function. I would suggest you change it back. The way you have it, the ScrollTrigger never scrolls, hence no smooth scrolling. Link to comment Share on other sites More sharing options...
Artleks Posted October 29, 2021 Author Share Posted October 29, 2021 Concerning smoothScroll function I only removed a couple of lines that were setting css and set it directly. Returned ScrollTrigger.create, but without change. Link to comment Share on other sites More sharing options...
OSUblake Posted October 29, 2021 Share Posted October 29, 2021 Your scroll container doesn't fill the screen, and the scrolling should be done by the body, so you can't have overflow hidden on it. It's important to understand how smooth scrolling works. I explain the basics of it here. 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now