Jump to content
Search Community

Lehmann

Members
  • Posts

    3
  • Joined

  • Last visited

Lehmann's Achievements

0

Reputation

  1. Thanks Rodrigo. That was pure enlightment . I just didn't "see" the triangle... So... I have two angles (90 and element-rotation) and the "c2" with "c2" either being the width or the height of the element, depending on the current element rotation. That way I'm able to calculate "a" and "b" for any rotation. Thanks for such a great help!!!
  2. Thank you both for such a quick reply. Both work for the 90 degree rotation and I understand thet transformOrigin is my best friend in that matter. Unfortunatly neither will work with a rotation of 45 degree. I made a fork of Rodrigos Codepen and added the needed translation for 45 degrees. http://codepen.io/anon/pen/sachb I guess I will have to somehow calculate the bounding box of the element in its final rotation before actually doing the rotation, then calculate the first x and y intersection of the element in its bounding box and use these values as left and top values in the in the translation.... and I need to do that before actually calling the tween-class since I need the values in the tween....
  3. Hi. I hope you can help me with some rotation issues. See the codepen here: http://codepen.io/anon/pen/potwE Thanks.
×
×
  • Create New...