Not exactly sure about various events you can use and exactly how they respond but I'd go with a mousedown/mouseup and a state-machine way.

Basicly on mousedown you change state to something like "from what, I drag what" and on mouseup you see where you clicked and add the saved state to it.

It's just a longshot idea, I didn't never did do exactly this.