sort the selectedTiles
horizontal groups can be moved horizontally, and vertical groups can be moved
vertically.
group-swap works for moving a group in a different axis from what the selection is (ie, a horizontal group moving vertically)