-
Notifications
You must be signed in to change notification settings - Fork 496
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draggable#updateDrag #8
Comments
First of all, my English sucks. Second I watch this problem when tried to drag an element (div) which is inside another div (overflow: auto). The problem: div box was not centered respect the pointer. The problem lead me to Draggable#updateDrag and I resolved appending some extra calculations to match the correct position of the box in the document. |
Hey,
I've been trying to implement a drag-drop interface where a marker pops-up when a draggable is hovered over a droppable. The position of the marker (before / after) is determined based on the overlap between a draggable and the droppable it is hovered over. I am using the onHover callback of the droppable which seems to pass the overlap relative to the mouse pointer and not the bounding box.
A little investigation brought me to Draggable#updateDrag which is one of the method used while calculating the overlap; here the pointer values returned are:
var pointer = [Event.pointerX(event), Event.pointerY(event)];
which are the mouse pointer values and not the coordinates of the bounding box. Shouldn't the bounding box coordinates be used to calculate the overlap or am I missing something?
Thanks
The text was updated successfully, but these errors were encountered: