fix layout border bottom and flex end with an empty child
This commit is contained in:
@@ -363,13 +363,11 @@ var computeLayout = (function() {
|
|||||||
|
|
||||||
var/*float*/ definedMainDim = fmaxf(mainContentDim, 0);
|
var/*float*/ definedMainDim = fmaxf(mainContentDim, 0);
|
||||||
if (!isUndefined(node.layout[dim[mainAxis]])) {
|
if (!isUndefined(node.layout[dim[mainAxis]])) {
|
||||||
definedMainDim = node.layout[dim[mainAxis]];
|
definedMainDim = node.layout[dim[mainAxis]] -
|
||||||
|
getPaddingAndBorderAxis(node, mainAxis);
|
||||||
}
|
}
|
||||||
|
|
||||||
// The remaining available space that needs to be allocated
|
// The remaining available space that needs to be allocated
|
||||||
var/*float*/ remainingMainDim = definedMainDim -
|
var/*float*/ remainingMainDim = definedMainDim - mainContentDim;
|
||||||
getPaddingAndBorderAxis(node, mainAxis) -
|
|
||||||
mainContentDim;
|
|
||||||
|
|
||||||
// If there are flexible children in the mix, they are going to fill the
|
// If there are flexible children in the mix, they are going to fill the
|
||||||
// remaining space
|
// remaining space
|
||||||
|
@@ -1088,6 +1088,16 @@ describe('Layout', function() {
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('should layout border bottom and flex end with an empty child', function() {
|
||||||
|
testLayout(
|
||||||
|
{style: {borderBottomWidth: 5, justifyContent: 'flex-end'}, children: [
|
||||||
|
{style: {}}
|
||||||
|
]},
|
||||||
|
{width: 0, height: 5, top: 0, left: 0, children: [
|
||||||
|
{width: 0, height: 0, top: 0, left: 0}
|
||||||
|
]}
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
xit('should layout flex-wrap', function() {
|
xit('should layout flex-wrap', function() {
|
||||||
testLayout(
|
testLayout(
|
||||||
|
Reference in New Issue
Block a user