Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stop scrolling behaviour until animation is finished #985

Open
dstN opened this issue Apr 21, 2021 · 0 comments
Open

Stop scrolling behaviour until animation is finished #985

dstN opened this issue Apr 21, 2021 · 0 comments

Comments

@dstN
Copy link

dstN commented Apr 21, 2021

I want to prevent my users to scroll for ages just to be sure the animation finishes, so my question is, are there any events like "onStart" / "onComplete" for the animation, so I could stop the scrolling behaviour with overflow: hidden; on the body until the animation is done and remove that afterwards?

I checked the (old) gsap Docs and there are onStart/onComplete Events either for TweenMax.to and TimelineMax - I tried using them, but they fired immediately after page-load and I don't know why.

(https://greensock.com/docs/v2/TimelineMax/TimelineMax())
(https://greensock.com/docs/v2/TweenMax/static.to())

I'm animating svg-Font to achieve a "draw"-like feeling on the page.

Fiddle: https://jsfiddle.net/yf89Lhzv/1/

(Hello World should be fully animated until the user can scroll again)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant