Drag element to dock in targets while draggin
I have many targets below each other, it is the hours of the day
each hour is a target. Then I have a element that is dragged over
the targets and when dropped it will be moved to the target dropped
into using this code in onDragDrop event:
Problem is that I want the drag element to "dock" into targets while
dragging. I am close to the solution by using same code as above in
the onDragOver event. But I have 2 problems:
1) The element is "flickering" while draging over targets (it is
docking and then back to mouse, docking etc). The flickering I can
remove overriding the alignElWithMouse method. But it is not 100%.
When overriden the drag element flick to the top left of the screen
before starting to dock in targets.
2) The element is docking when the mouse pointer is over the target
but I want it to dock using top left of the element.
So if I click on the middle of the drag element and move over
targets the drag element is moved down to the target below mouse
pointer. I want it to dock to top left of element.
Anyone solved this or know how?