actually make work left and right

This commit is contained in:
Christopher Chedeau
2014-06-12 10:09:42 -07:00
parent cc11a535ce
commit 1c9749f93e
2 changed files with 3 additions and 2 deletions

View File

@@ -491,6 +491,7 @@ var computeLayout = (function() {
if (leadingPos && trailingPos) {
child.layout[dim[crossAxis]] =
node.layout[dim[crossAxis]] -
child.layout[pos[crossAxis]] -
getMargin(child, trailing[crossAxis]) -
getPosition(child, trailing[crossAxis]);
}

View File

@@ -933,8 +933,8 @@ describe('Layout', function() {
{style: {width: 100}, children: [
{style: {right: 5, left: 5, position: 'absolute'}}
]},
{width: 0, height: 0, top: 0, left: 0, children: [
{width: 5, height: 0, top: 0, left: -20}
{width: 100, height: 0, top: 0, left: 0, children: [
{width: 90, height: 0, top: 0, left: 5}
]}
);
});