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

Not run the animation when the page is loading #36

Open
davinanaya opened this issue Apr 23, 2017 · 1 comment
Open

Not run the animation when the page is loading #36

davinanaya opened this issue Apr 23, 2017 · 1 comment

Comments

@davinanaya
Copy link

davinanaya commented Apr 23, 2017

Hello,

Actually, i added the animation to a variable but when the page is loading the animation is run but i just want to run the animation in future handler not when the page is loading. Is that possible ?

This is working but i do not want to the animation run immediately.
componentDidMount(){ window.animCircleNext = this.addAnimation(createAnim2Test) }

Regards.

@dbryand
Copy link

dbryand commented May 4, 2017

You may want to put a .pause() in your createAnim2Test tween and then in componentDidMount do something like:

componentDidMount(){
  var animCircleNext = this.addAnimation(createAnim2Test);
  // Do whatever you need to before animation plays...
  animCircleNext.play()
}

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

2 participants