Hi,
In the drop event handler, you can center the drag source as follows:
// center drag source on drop target
var dX = ($(this).width() - ui.draggable.width()) / 2;
var dY = ($(this).height() - ui.draggable.height()) / 2;
ui.draggable.css({
left: this.offsetLeft + dX,
top: this.offsetTop + dY,
transform: this.style.transform
});
I’ve also updated the sample project to include this piece of code in your previous thread: How to get name of drop target - #2 by ToanLS
Regards