Jump to content
Search Community

Michael McCrickard

Members
  • Posts

    4
  • Joined

  • Last visited

Community Answers

  1. Michael McCrickard's post in Animating to an absolute position was marked as the answer   
    OK, after some experimentation on codepen, here's my solution.  Position your element initially at 0,0.  Then whatever absolute coordinates you pass to TweenLite.to( ) will be calculated relative that position.  Voila!  You will be animating to "absolute" positions every time.  
     
    If you don't initially position your element at 0,0 -- then whatever position you element has initially becomes it's home spot.  And whenever you animate that element to 0,0 -- it returns to that home spot and not to 0,0 on your screen.
     
    If you have element with a arbitrary starting position like that and you still need to do absolute positioning, you simply subtract the element's home position from the desired position (desiredX - homeSpotX, desiredY - homeSpotY) , and pass those values to TweenLite.to( ).  
×
×
  • Create New...