Click & Drag on the left or right vertices towards that direction; You'll notice if you pull to far, the square will be stopped, & cannot be moved in that direction any longer. (At least not until you pull it back)
All art + code by me; @PIZZA_PLAYER UPDATE! On the last version, you could only pull, the left & right sides. Now; you can move the whole square with it! Not Perfect, but since I'm the first person to do this; I'll just have to sit with it for now.