Building the orientation-aware layout