How to move a layer only in one direction?
You can move any object by dragging on the Position coordinates in the object's timeline.



Alternatively, you can constrain to a single dimension when moving an object in the canvas by putting your cursor over the appropriately coloured arrow (R, G, B, = x, y, z).  Wait for your cursor to show a letter next to it, then drag the object.