Share Posted January 5, 2019 I am trying to rotate an SVG with a text element whose "y" attribute is expressed in % units. During the animation the text does not keep the proper position. The elements slides down relatively to other elements in the SVG . If I change the "y" attribute to an absolute value - it rotates as expected Even if I perform only the .to tween - I can see the text slide down a little ... Is it something I should expect ? My tween : tl = new TimelineMax({paused: "true"}); tl .to(svg, 1, {delay: 1, attr:{viewBox:"-120 -96 392 96"}} ) .staggerTo(".symbol_copy", 1, { autoAlpha: true, svgOrigin: "8px 56px", cycle: { rotation: [-100,-75,-50,-25], rotationZ: 0.001, delay: function(index) { return 0.7-(0.15 * index); } } }, 0 ); maxi_tl.play(); See the Pen bOMdog by tagtag (@tagtag) on CodePen Link to comment Share on other sites More sharing options...
Share Posted January 6, 2019 Hi @tagger, Welcome to the GreenSock Forum. Please provide a reduced test case (see info here) to show the problem. Kind regards Mikel 1 Link to comment Share on other sites More sharing options...
Author Share Posted January 6, 2019 Thanks for the tip Codepen added in the question Link to comment Share on other sites More sharing options...
Share Posted January 6, 2019 Percentage values are relative to the viewBox, so that's expected. That's has nothing to do with GSAP. Set it yourself to see. document.querySelector("#mySVG").setAttribute("viewBox", "-120 -96 392 96") 3 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