Drag&Drop: How to simulate DragEnter event?

Hi,

I’ve been trying to do this for about 8 hours, with no solution. I give up.

I’m trying to do an elaborated Drag&Drop behaviour. I have one Button which need to be Long Pressed before activating the Drag. After Drag is activated, I’m trying to move the Button inside one of the 4 areas. (the Button is already placed on one area). Afterwards, I want to be able to release the Button inside another area and it snaps to that area, simulating a MouseEnter or DragEnter event.

HoverInside works for the starting target: its action works immediately. HoverInside, however, doesn’t work on the other 3 targets.

Is that a bug or there is something I’m not doing correctly? Or is it possible to add a DragEnter event as a new feature?

Thanks a lot,
Phil

You can fake that if you can control where the item is going to be dragged into.

Is this what are you trying to achieve?

Mind sharing your file so we can take a look at what you have tried so far?

Thanks for the explanation. However, what I’m trying to achieve is more complex.

Here is one of the file I created along the process.
Drag&DropTest.prd

I see, thanks for sharing the file, what’s failing in this example? It seems to work nicely!

The Button is supposed to snap inside the nearest circle when released. But no snapping occurs on my side. Is it working on yours? If so, mind sending me a capture? Thanks!

It snaps on DragEnds, is that what you are after? Or do you want it to snap on HoverInside?

If you want it to snap as soon as it enters the target, I’m afraid that is not possible as you are still performing the drag gesture.

I want it to snap to whatever circle it’s released on, on DragEnds, yes. This currently doesn’t work, on my side.

it works well on my side, I just had to change the HoverInside targets.

Let me know if it works!

EDIT: Never mind, it works on my side. I wasn’t doing it properly. This is not failproof though.

Anyway, thanks for your help! :slight_smile:

But you are not doing the ‘tap+hold’ there, try to hold, once it changes to next state, then move and it will snap to the circle once you release!

(No, I don’t work with Daniel)

1 Like

You’re right, I edited the previous message. Thanks for your help! :slight_smile:

1 Like

Glad to see it worked, Phillipe! :raised_hands:t2: