Upvote 2

Implement Drag and Drop

Answered George 7 years ago

I need to drag, let's say, Component A to Component B. If the drag stop happens on top of component B, it should merge with Component B. If the drag stop happens elsewhere, Component A should be sent back to its drag start position.


I know this is very well achievable looking at the versatility of JustinMind, but I am not able to figure out how. I added two cases in drag_stop for Component A. The first case, which is to head back to origin when dropped outside of Component B, works well. But when it comes to the second case, which is stick to Component B's position when drag inside of it, first triggers Case 1 before it can trigger Case 2. Help Help Help!

Replies (2)
photo
1

Hi George,


The example attached should help.


Best,


Sonia Durán

photo
2

This is perfect!!! Thank you Sonia. I would not have thought about the if area contains area clause.

Leave a Comment
 
Attach a file