Jump to content
Search Community

Issue with transform origin on a path

Michaël Garcia test
Moderator Tag

Go to solution Solved by Michaël Garcia,

Recommended Posts

I've an svg made of simple paths. 

I want to scale up each path individually, based on their own centers. I'm really struggling to preserve the transform-box: fill-box css property.  I also tried to set the transform-origin with GSAP directly but it doesn't change a thing.


I tried to animate those paths with a simple css animation and it works correctly. Does anyone know what I'm missing with my tween ? 

Thank you very much

See the Pen gOKOaRJ by michaelgrc (@michaelgrc) on CodePen

Link to comment
Share on other sites

This is part of the reason why you should always set transform-related values directly through GSAP. It's faster and more accurate. In your demo, you're doing it only in the CSS. Various browsers report the values in odd ways and always in pixels, so it's tricky to decipher (often impossible actually).

 

Is this what you wanted?: 

See the Pen zYaYqqx by GreenSock (@GreenSock) on CodePen

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