diff --git a/src/Layout.js b/src/Layout.js index 4e6fa628..9e2e9e18 100755 --- a/src/Layout.js +++ b/src/Layout.js @@ -479,6 +479,7 @@ var computeLayout = (function() { if (!leadingPos && trailingPos) { child.layout[pos[mainAxis]] = node.layout[dim[mainAxis]] - + getBorder(node, trailing[mainAxis]) - child.layout[dim[mainAxis]] - getMargin(child, trailing[mainAxis]) - getPosition(child, trailing[mainAxis]); @@ -524,6 +525,7 @@ var computeLayout = (function() { if (!leadingPos && trailingPos) { child.layout[pos[crossAxis]] = node.layout[dim[crossAxis]] - + getBorder(node, trailing[crossAxis]) - child.layout[dim[crossAxis]] - getMargin(child, trailing[crossAxis]) - getPosition(child, trailing[crossAxis]); diff --git a/src/__tests__/Layout-test.js b/src/__tests__/Layout-test.js index 0c24441f..e530d079 100755 --- a/src/__tests__/Layout-test.js +++ b/src/__tests__/Layout-test.js @@ -1005,6 +1005,17 @@ describe('Layout', function() { ); }); + it('should layout with border and right absolute child', function() { + testLayout( + {style: {borderRightWidth: 5}, children: [ + {style: {right: -10, position: 'absolute'}} + ]}, + {width: 5, height: 0, top: 0, left: 0, children: [ + {width: 0, height: 0, top: 0, left: 10} + ]} + ); + }); + xit('should layout text with alignItems: stretch', function() { testLayout( {style: {width: 80, padding: 7, alignItems: 'stretch', measure: text('loooooooooong with space')}},