ashthornton / asscroll

Ash's Smooth Scroll 🍑
MIT License
946 stars 27 forks source link

Can't scroll full height on the inner container #21

Closed PaulBouisset closed 3 years ago

PaulBouisset commented 4 years ago

Hi, first thanks for your library it's great especially for the exemple you provide for GSAP scrollTrigger !

But I have an issue with the smooth scrolling, I can't scroll to the full height of the inner container. For exemple on page load my inner container is 2406px height but the smoothscroll only translate the inner container until -1486px, so a big part on the inner container is not visible.

Do you know what could cause this?

ashthornton commented 4 years ago

Hi @PaulBouisset, have you made sure you are enabling ASScroll after all images have loaded? Or you can manually call ASScroll.onResize() after images have loaded. That's if you have images on your page of course.

PaulBouisset commented 4 years ago

Hi @ashthornton, yes I made sure I enable ASScroll after all images are loaded but it seems like ASScroll is not getting the right inner element height. Do you have an idea how I could debug this?

ashthornton commented 4 years ago

@PaulBouisset I think the best way would be to make a reduced example using codepen or similar, then I could take a look