Drag&Drop: How to simulate DragEnter event?

#1

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

0 Likes

#2

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?

0 Likes

Continuing touch events between artboards
#3

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

0 Likes

#4

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

0 Likes

#5

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!

0 Likes

#6

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.

0 Likes

#7

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

0 Likes

#8

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

Let me know if it works!

0 Likes

#9

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:

0 Likes

#10

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

#11

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

1 Like

#12

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

0 Likes