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 dragove
The properties clientX and clientY should be set (in modern browsers):
function drag_over(event) {
console.log(event.clientX);
console.log(event.clientY);
event.preventDefault();
return false;
}
function drop(event) {
console.log(event.clientX);
console.log(event.clientY);
event.preventDefault();
return false;
}
Here's a (somewhat) practical example that works in Firefox and Chrome.