Hello all,
if I have a div positioned at 0,0 (translated), and I want to bring it to the center of the screen, let's say X=320.
if I move it with GSAP, the top left corner is calculated towards 320px, meaning it's not fully centered, and what I really need to do is move it to 320-div.width/2 to get the proper results.
I've tried using transform-origin but that doesn't seem to help (also, transform-origin is 50% 50% by deault if I'm not mistaken).
I have lots of elements, and the vast majority of them should be move from their center point.
Any quick solution for this using GSAP?
Attached a codepen to illustrate the problem
Thanks!