Fix and improve mouse-dragging of horizontal/vertical lines.