changing alignment of children to consider the origin of the parent based on its position