Is there a formal way to set/get/clear _gsTransform? in GSAP Posted December 18, 2013 Sure, if you want to clear those, you can do something like this: TweenLite.set(element, {clearProps:"transform"}); It'll also work if you clearProps: any transform-related value, like clearProps:"rotation". apparently clearProps deletes previously set (inline) transform properties of an element... is there a way to revert back to element's original inline styles? HTML: <div id="el" style="-webkit-transform: rotate(45deg);">blabla</div> JS - tween: TweenMax.to("#el", 2, {rotation:125}); JS - clearProps: TweenMax.killTweensOf("#el"); TweenMax.set("#el", {clearProps: "transform"}); the result is not as expected, element rotation is at 0 degrees instead of 45 degrees 1
Is there a formal way to set/get/clear _gsTransform?
in GSAP
Posted
apparently clearProps deletes previously set (inline) transform properties of an element...
is there a way to revert back to element's original inline styles?
HTML:
JS - tween:
JS - clearProps:
the result is not as expected, element rotation is at 0 degrees instead of 45 degrees