fix children with left
This commit is contained in:
@@ -267,8 +267,7 @@ var computeLayout = (function() {
|
|||||||
if (getAlignItem(node, child) === CSS_ALIGN_STRETCH &&
|
if (getAlignItem(node, child) === CSS_ALIGN_STRETCH &&
|
||||||
getPositionType(child) === CSS_POSITION_RELATIVE &&
|
getPositionType(child) === CSS_POSITION_RELATIVE &&
|
||||||
!isUndefined(node.layout[dim[crossAxis]]) &&
|
!isUndefined(node.layout[dim[crossAxis]]) &&
|
||||||
!isDimDefined(child, crossAxis) &&
|
!isDimDefined(child, crossAxis)) {
|
||||||
!isPosDefined(child, leading[crossAxis])) {
|
|
||||||
child.layout[dim[crossAxis]] = fmaxf(
|
child.layout[dim[crossAxis]] = fmaxf(
|
||||||
node.layout[dim[crossAxis]] -
|
node.layout[dim[crossAxis]] -
|
||||||
getPaddingAndBorderAxis(node, crossAxis) -
|
getPaddingAndBorderAxis(node, crossAxis) -
|
||||||
|
@@ -1099,6 +1099,21 @@ describe('Layout', function() {
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('should layout with children of a contain with left', function() {
|
||||||
|
testLayout(
|
||||||
|
{style: {width: 800}, children: [
|
||||||
|
{style: {left: 5}, children: [
|
||||||
|
{style: {}}
|
||||||
|
]}
|
||||||
|
]},
|
||||||
|
{width: 800, height: 0, top: 0, left: 0, children: [
|
||||||
|
{width: 800, height: 0, top: 0, left: 5, children: [
|
||||||
|
{width: 800, height: 0, top: 0, left: 0}
|
||||||
|
]}
|
||||||
|
]}
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
xit('should layout flex-wrap', function() {
|
xit('should layout flex-wrap', function() {
|
||||||
testLayout(
|
testLayout(
|
||||||
{style: {flexWrap: 'wrap', flexDirection: 'row', width: 100}, children: [
|
{style: {flexWrap: 'wrap', flexDirection: 'row', width: 100}, children: [
|
||||||
|
Reference in New Issue
Block a user