Expose the resolved direction in the node's layout

This commit is contained in:
Lucas Rocha
2015-05-20 11:12:24 +01:00
parent ee1cbacc30
commit 524b44200a
7 changed files with 33 additions and 0 deletions

View File

@@ -536,6 +536,9 @@ static void layoutNodeImpl(css_node_t *node, float parentMaxWidth, css_direction
setDimensionFromStyle(node, mainAxis);
setDimensionFromStyle(node, crossAxis);
// Set the resolved resolution in the node's layout
node->layout.direction = direction;
// The position is set by the parent, but we need to complete it with a
// delta composed of the margin and left/top/right/bottom
node->layout.position[leading[mainAxis]] += getLeadingMargin(node, mainAxis) +