Forum Discussion
JavierCollRodri
12 years agoContributor
Hi Sonali,
I was facing this problem this problem too, and I created a script to solve that this way:
This should do the trick!
I was facing this problem this problem too, and I created a script to solve that this way:
Retrieve the dragged object (with a find method, for example)
Retrieve the destination object (the same way)
Calculate the difference between dragged and destination objects top and left:
- dragX = dragged object width / 2
- dragY = dragged object height / 2
- destinationX = dragged object left + dragX - ( destination object left + destination object width / 2 )
- destinationY = dragged object top + dragY - ( destionation object top + destination object height / 2 )
Perform the drag and drop to these coordinates
This should do the trick!
Related Content
- 3 years ago
- 12 years ago
- 12 years ago
Recent Discussions
- 11 hours ago