Currently I'm trying to use draggable to be able to move blocks onto target spots, and if the spot isn't "exact" it would adjust them to be exactly on top of the element. I've attached a minimal example
The part I'm getting stuck on is here:
// move onto target
gsap.to(e.target, 0.1, {
left: p.left,
top: p.top,
x: 0,
y: 0,
});
My blocks seem to disregard this, I don't fully understand how to make one element "tween" ontop of another one. the values my console log provide seem accurate but it does nothing in draggable/gsap, it only remains on the spot I left it.
Any advice?
Thanks,