You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
html5 drag and drop events have clientX and clientY values, could these be exposed in some way?
I tried using mousemove to get the position, but during a d-n-d operation, that event doesn't fire.
DragData could be extended to include that information, but that feels wrong, since "dragdata" has a specific meaning in html5. Also some drag events don't get clientX and clientY, in particular dragend does not. How about instead adding the coordinates to events like this:
drop :: Element -> Event (DragData, (Int, Int))
The text was updated successfully, but these errors were encountered:
An example use of this would be a game where objects are thrown around using drag and drop. By watching the mouse position, direction and speed can be calculated, so the object keeps moving after it's dropped.
joeyh
added a commit
to joeyh/threepenny-gui
that referenced
this issue
May 28, 2017
html5 drag and drop events have clientX and clientY values, could these be exposed in some way?
I tried using mousemove to get the position, but during a d-n-d operation, that event doesn't fire.
DragData could be extended to include that information, but that feels wrong, since "dragdata" has a specific meaning in html5. Also some drag events don't get clientX and clientY, in particular dragend does not. How about instead adding the coordinates to events like this:
The text was updated successfully, but these errors were encountered: