Wtih Greensock it's easy enough to move something to the centre of the container by using...
.to(".target", 1,
{
left:'50%', top:'50%',
xPercent:'-50', yPercent:'-50'
}
)
Once it is positioned it can then be moved relative (in px, %, em, or whatever) by using..
.to(".target", 1, {left:'+=20px'})
But is there any way to combine these two positional transforms in one go and basically say 'Smoothly move this object to a point 20px right of the centre of screen'? I've tried a few attempts but nothing seems to be working.
Do I need to fudge things by moving the object to the centre, applying the relative offset, getting the resultant transform, resetting the position to the original, and then tweening to the result or am I missing something? What I'd imagine would be the 'dream solution' would be something like:
.to(".target", 1,
{
left:'50%+20px', top:'50%',
xPercent:'-50', yPercent:'-50'
}
)