How do I implement a drag and drop in a widget?

When you drop:

  • add the payload to a new container (a border / named slot in the recycle widget)
  • play the animation
  • once the animation has finished, Remove (the dropped widget) From Parent

It would look close to this:

  • expose the desired container as variable (here, a border):

image

  • create a custom event to handle the animation and removing the widget after.

  • when you drop:

Untested but should work a.k.a. famous last words


Essentially a widget can only have a single parent, adding a widget to new container reparents it.


The above can be made work better with a custom Drag&Drop operation.