Jump to content
Search Community

Flip.from() after timeline animation completes causes jump

scottnj test
Moderator Tag

Recommended Posts

I have an intro animation timeline that works great.  The onComplete of this timeline then calls a function that uses Flip.from() to animate my header and brand from fullscreen to a normal top nav bar.

 

After I use Flip.getState() I remove my ".big" class from my header, then use Flip.from(). 

 

When I remove the ".big" class from my header, it causes a jump in the animation.

Is there a better way for me to accomplish this? I can't figure out how to get rid of the jump.

See the Pen GRyObez by scottnj (@scottnj) on CodePen

Link to comment
Share on other sites

Is this what you wanted? 

See the Pen wvppvyO?editors=0010 by GreenSock (@GreenSock) on CodePen

 

When you're using things like display: flex, don't forget to set absolute: true (watch the video that explains it - that's not a Flip thing...it's just that the browser doesn't honor width/height values when you use display: flex). And Flip doesn't analyze every possible CSS property, otherwise it would hurt performance so if you're animating things other than position and size you need to add those to the "props" list so that Flip knows to record/animate them (fontSize in your case).

 

Does that clear things up? 

  • Like 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...