Jump to content
Search Community

set() and duration 0 is not working

Mike G test
Moderator Tag

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

I am having what I am sure is a bizarre and uncommon problem. I'm in react, and doing the simplest of tweens. The problem is I'm wanting it to zoom in from 0 values, rather than from the starting position to zero. The documentation clearly says set() is like a 0 duration tween to push the element into the starting position, but when I do this it actually animates for 1 second. When I try to() with duration 0, it does the same thing. Duration works for any numbers above 1, but not below 1. Why is it not recognizing 0 duration? It's being done in a react componentDidMount() function. Any help would be appreciated!

TweenLite.set(document.getElementById("masterModal"), {
scale: 1,
opacity: 1
});
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...