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

@@ -111,6 +111,7 @@ var computeLayout = (function() {
delete layout.right;
delete layout.bottom;
delete layout.direction;
return layout;
}
@@ -407,6 +408,9 @@ var computeLayout = (function() {
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[leading[mainAxis]] += getLeadingMargin(node, mainAxis) +