dnd-kit icon indicating copy to clipboard operation
dnd-kit copied to clipboard

Get dropped item coordinates?

Open baptisteArno opened this issue 3 years ago • 2 comments

I'm trying to compute the item position when dropping it.

The event object doesn't give me enough info: CleanShot 2021-11-18 at 21 00 22

How can I do this?

baptisteArno avatar Nov 18 '21 20:11 baptisteArno

As a work around, I'm tracking mouse position:

useEventListener("mousemove", (event: any) => {
    setMouseCoord({ x: event.clientX, y: event.clientY });
});

baptisteArno avatar Nov 20 '21 07:11 baptisteArno

Having the item position (not only delta) in the event object would be very helpful

efossvold avatar May 18 '22 09:05 efossvold