main axis padding
This commit is contained in:
@@ -489,7 +489,7 @@ var computeLayout = (function() {
|
|||||||
child.layout[pos[mainAxis]] -
|
child.layout[pos[mainAxis]] -
|
||||||
getMargin(child, trailing[mainAxis]) -
|
getMargin(child, trailing[mainAxis]) -
|
||||||
getPosition(child, trailing[mainAxis])
|
getPosition(child, trailing[mainAxis])
|
||||||
);
|
) + getPaddingAndBorderAxis(child, mainAxis);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -961,6 +961,17 @@ describe('Layout', function() {
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('should layout with position absolute top, bottom and padding', function() {
|
||||||
|
testLayout(
|
||||||
|
{style: {}, children: [
|
||||||
|
{style: {top: 5, bottom: 5, paddingTop: 5, position: 'absolute'}}
|
||||||
|
]},
|
||||||
|
{width: 0, height: 0, top: 0, left: 0, children: [
|
||||||
|
{width: 0, height: 5, top: 5, left: 0}
|
||||||
|
]}
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
xit('should layout text with alignItems: stretch', function() {
|
xit('should layout text with alignItems: stretch', function() {
|
||||||
testLayout(
|
testLayout(
|
||||||
{style: {width: 80, padding: 7, alignItems: 'stretch', measure: text('loooooooooong with space')}},
|
{style: {width: 80, padding: 7, alignItems: 'stretch', measure: text('loooooooooong with space')}},
|
||||||
|
Reference in New Issue
Block a user