diff --git a/src/Layout.js b/src/Layout.js index 051b6efb..ab0533bc 100755 --- a/src/Layout.js +++ b/src/Layout.js @@ -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]); } diff --git a/src/__tests__/Layout-test.js b/src/__tests__/Layout-test.js index 640c2ddc..0a4b85e0 100755 --- a/src/__tests__/Layout-test.js +++ b/src/__tests__/Layout-test.js @@ -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} ]} ); });