Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
vsiege

on bowser resize, transitioned elements loose desired position

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

Thank you GSAP team for an amazing product!

 

I wouldn't file this as anything more than I could use someone's help or advice. I don't believe it has anything to do with GSAP/TimelineLite. I just want the community's advice on how to achieve the desired effect.

 

Desired effect:

  1. Have 3 elements (100% width of browser) animate to the right and end on the right side of browser
  2. Once complete, they will cover/stack on top of each other
  3. If a user resizes the browser, they will remain in place - locked to left side of browser, at full width

 

How to reproduce:

  1. Visit my pen link
  2. Waiting for the 3 elements to finish animating. At this point, there's no issue/undesired effect (just GSAP awesomeness)
  3. Now, resize the browser and you'll see that the blue bars/wipes do not stay locked to the side 

 

Below, I have attached an image of the undesired behavior upon browser resize

 

Thanks for your help!

Screen Shot 2019-09-20 at 11.24.44 AM.png

See the Pen aboQrdG by vsiege (@vsiege) on CodePen

Link to comment
Share on other sites

Check out some of the posts I made in this thread.

 

 

  • Like 4
Link to comment
Share on other sites

@OSUblake Thanks for the material. Much appreciated,

 

I have created the RESOLVED version of my original codepen for those interested in solving the same.

See the Pen zYOyYzg by vsiege (@vsiege) on CodePen

 

 

This version sets this in my SCSS

@include translate3d(-100%);

 

In my JS, I switched the transitioned property to x

Wipe.tl.to(Wipe.wipe1, .7, {x:0});
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.

×