HTML5: dragover(), drop(): how get current x,y coordinates?

Posted by Pete Alvin on Stack Overflow See other posts from Stack Overflow or by Pete Alvin
Published on 2010-03-13T12:34:24Z Indexed on 2010/03/13 12:35 UTC
Read the original article Hit count: 256

Filed under:
|

How does one determine the (x,y) coordinates while dragging "dragover" and after the drop ("drop") in HTML5 DnD?

I found a webpage that describes x,y for dragover (look at e.offsetX and e.layerX to see if set for various browsers but for the life of me they ARE NOT set).

What do you use for the drop(e) function to find out WHERE in the current drop target it was actually dropped?

I'm writing an online circuit design app and my drop target is large.

Do I need to drop down to mouse-level to find out x,y or does HTML5 provided a higher level abstraction?

© Stack Overflow or respective owner

Related posts about html5

Related posts about drag-and-drop