If you can, post a current code with traditional drag in all directions, which shows how to apply this logic when you have a little time.
For now, follow the logic in "agnostic" code:
When you click the mouse:
xOrigemObjeto = xAtualObjeto;
yOrigemObjeto = yAtualObjeto;
xOrigemMouse = xMouse;
yOrigemMouse = yMouse;
While dragging (in the mouse movement signal):
deltaX = xOrigemMouse - xMouse;
deltaY = yOrigemMouse - yMouse;
if( abs( deltaX ) > abs( deltaY ) ) {
xAtualObjeto = xOrigemObjeto + deltaX;
yAtualObjeto = yOrigemObjeto;
} else {
xAtualObjeto = xOrigemObjeto;
yAtualObjeto = yOrigemObjeto + deltaY;
}
The only care is to update the source of the object only after the user releases the mouse.
Basically what we are doing here is to consider whether the mouse has walked more in X or Y, and change only one of the positions, "locking" the other.