Jump to content
Search Community

Cario

Members
  • Posts

    1
  • Joined

  • Last visited

Posts posted by Cario

  1. 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

    • Like 1
×
×
  • Create New...