Share Posted August 22, 2013 Hey, I seem to have an issue with tween lite rotation. when applying rotation:180 to a div. The tween works once. after resetting the css of the div I apply rotation:180 it does nothing... It seems the transform matrix isn't cleared. This only happen only steps of 180, 360... anything else works fine. TweenLite.to($("#image1'), 5, {rotaion:180, parseTransform: true, clearProps: "transform" }); Thank's in advance Link to comment Share on other sites More sharing options...
Share Posted August 22, 2013 Hi, You have a syntax error in your code, the property being cleared must be the same one being animated, so it should be clearProps:"rotation". And yes for some reason, that unfortunately I don't know, the clear props call resets the element's in-line style, but the transform values of the _gsTransform object aren't reseted, so if the element is animated again the rotation doesn't animate even if the element is rendered in it's original angle. Until an official explanation comes up what you could do is create a onComplete callback that sets the element's rotation back to 0, like this: TweenLite.to($("#image"), .5, {rotation:180, parseTransform:true, clearProps:"rotation", onComplete:resetRotation}); function resetRotation() { TweenLite.set($("#image"), {rotation:0}); } Hope this helps, Rodrigo. Link to comment Share on other sites More sharing options...
Share Posted August 23, 2013 Yep, sorry about that guys - it was a tricky issue with clearing the values out in a certain scenario, but it should be resolved in 1.10.3. I've attached a preview version of that - would you mind verifying that it resolves the issue for you? GSAP_1.10.3_preview2.zip 1 Link to comment Share on other sites More sharing options...
Share Posted August 23, 2013 Works great Jack. Thanks, Rodrigo. 2 Link to comment Share on other sites More sharing options...
Author Share Posted August 25, 2013 Thank you for the very quick reply, I don't think iv'e ever gotten such a fast reply on a support forum... I used the Rhernando's fix with onComplete which works. Odd why only 180 deg multiples dont get reset.... Any date on the 1.10.3. release???? Thanks again. Maor Link to comment Share on other sites More sharing options...
Share Posted August 26, 2013 1.10.3 should be released before next weekend. No set date quite yet - we're working on a few things that we want to include in that release. Stand by... 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