Jump to content
Search Community

Flip Conflicting With Altering Units In Config

OneManLaptop test
Moderator Tag

Go to solution Solved by GreenSock,

Recommended Posts

Hey folks, so I've been having great fun working with the new Flip plugin (really, top work) but when trying to integrate some of my tests into my main project, I noticed all the Flip calculations were completely off. After a while spent head scratching, I realised that it was caused by my alteration of the units in the GSAP config.

I've added my config to a fork of one of your own demos, so you can see the issue:

 



I like to build my sites predominately in rem units, so it does save time and code to be able to set my tweens to use rems by default. I appreciate that this will be a bit of an edge case, but I thought I'd bring it to your attention and as I say, the ability to change default units is of genuine utility to me, so I hope I'm not making the case to drop that feature here. 😆

If there's a workaround, then that would be greatly received. Thanks.

See the Pen zYoORPy by OneManLaptop (@OneManLaptop) on CodePen

Link to comment
Share on other sites

5 hours ago, GreenSock said:

Thanks for pointing that out, @OneManLaptop. I'll explicitly set px units for x, y, width, and height in the next release of Flip. I've updated the Codepen version of the file already. If you need an advanced copy of it for your productions sites, I'd be happy to send it your way. 

 

That would be really helpful, thanks a lot. Does the fix cover additional props such as font size or padding etc? Thanks again. :)

 

Link to comment
Share on other sites

  • Solution
8 hours ago, OneManLaptop said:

That would be really helpful, thanks a lot. Does the fix cover additional props such as font size or padding etc? Thanks again. :)

Yeah, Flip doesn't have to do special calculations for that stuff, so it should be fine as it passes through. But of course let me know if you run into any problems. I shot you an email with info about how to get the preview file(s). 

  • Thanks 1
Link to comment
Share on other sites

16 hours ago, GreenSock said:

Yeah, Flip doesn't have to do special calculations for that stuff, so it should be fine as it passes through. But of course let me know if you run into any problems. I shot you an email with info about how to get the preview file(s). 

 

Got it, everything working as expected. Thanks a lot Jack, really appreciate access to the early fix.

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