Share Posted December 11, 2016 Hi there, I am new to greensock and even to jquery/javascript at all. I am trying to scale the "g" parts of a svg element from 0 to 1. It already works but the elements don't stay in their end position when they are animating, but "move" in along the x and y axis. I am wondering if there is a way, that they stay fixed in their position and just scale from 0 to 1? I already searched the forum and found advises about transformOrigin, but none of them solved my problem. See the Pen KgdyGj by iuscare (@iuscare) on CodePen Link to comment Share on other sites More sharing options...
Share Posted December 11, 2016 Hi iuscare you just need to set transformOrigin like this : TweenMax.staggerFrom(listItems, .4, {scale:0,transformOrigin:'center'}, 0.3); 3 Link to comment Share on other sites More sharing options...
Author Share Posted December 11, 2016 Hey Diaco, thank you so much for your answer, it worked well for me. It's so strange for an amateur, I've already tried that before, but was not able to get the desired effect. Seems that I had a syntax error or sth. like this, although the console did not grumble and the animation took place. Anyway, you made my day! This support forum is so great, where you can get help without worrying that you could annoy other people. Keep it up! 2 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now