Jump to content
Search Community

Can gsap switch from % to px automatically while setting transform origin?

Sahil test
Moderator Tag

Recommended Posts

Hi,

Sorry can't provide a demo. I am trying to debug an odd behavior in complex project. We have all our transformOrigin values set in % and nowhere we specifically set transformOrigin in pixels but in one scenario values change from % to px. While changing to pixels, transform origin gets calculated correctly as 50% but gets set as pixels, so if div has 300px width, transform origin gets set to 150px. Is it a known behavior or in any scenario gsap will choose to switch to pixels?

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