Jump to content
Search Community

Flip & ResizeWindow

mixagai

Go to solution Solved by Rodrigo,

Recommended Posts

Posted

Hello!  I need some help. I can't figure out how I should recalculate the dimensions when resizing a page. When I resize the page, the dimensions of the .element don't change and it goes off screen. How can I recalculate them?

See the Pen GgpKVJg by mixagai (@mixagai) on CodePen.

  • Solution
Posted

Hi @mixagai and welcome to the GSAP Forums

 

You can use GSAP Context and a GSAP delayedCall in order to revert everything inside the context scope and create the Flip animation again, something like this:

See the Pen zxvYxae by GreenSock (@GreenSock) on CodePen.

 

Hopefully this helps

Happy Tweening!

Posted

Thank you very much! You have solved my problem. I'm going to learn how these functions work👍

  • Like 1

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