if page is landscape swap the x and y values