Drag and Drop - function whileDragging

New Here ,
Apr 29, 2021 Apr 29, 2021

Copy link to clipboard

Copied

I have a drag and drop interaction where I need to find out which part (x-/y-coordinates) of the drag object hits the drop target while moving the drag object. In the attached video you can see what I need to do:

While moving the drag object only when the left blue point of the drag object is over the drop target (right blue point) a red frame is shown. When another part of the drag object is over the drop target the red frame is not visible. So I can't use the InBuilt state "DragOver". After Mouse relase I have to check again the x-/y-cordinates of  the drag object. Is the drag object in the right position (red frame visible) the solution is correct. Is the drag object not in the right position (red frame not visible) the solution is wrong.

Hope the JS experts can help me.

Views

23

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
no replies

Have something to add?

Join the conversation