handles mousedown and move.