do not infinite loop when there's an element bigger than the container with flex-wrap
This commit is contained in:
@@ -104,7 +104,7 @@ describe('Layout', function() {
|
||||
);
|
||||
});
|
||||
|
||||
it('should layout node with flex', function() {
|
||||
it('should layout node with just flex', function() {
|
||||
testLayout(
|
||||
{style: {width: 1000, height: 1000}, children: [
|
||||
{style: {width: 100, height: 200}},
|
||||
@@ -1159,6 +1159,19 @@ describe('Layout', function() {
|
||||
);
|
||||
});
|
||||
|
||||
it('should layout flex wrap with a line bigger than container', function() {
|
||||
testLayout(
|
||||
{style: {height: 100, flexWrap: 'wrap'}, children: [
|
||||
{style: {height: 100}},
|
||||
{style: {height: 200}},
|
||||
]},
|
||||
{width: 0, height: 100, top: 0, left: 0, children: [
|
||||
{width: 0, height: 100, top: 0, left: 0},
|
||||
{width: 0, height: 200, top: 0, left: 0}
|
||||
]}
|
||||
);
|
||||
});
|
||||
|
||||
xit('should layout text with alignItems: stretch', function() {
|
||||
testLayout(
|
||||
{style: {width: 80, padding: 7, alignItems: 'stretch', measure: text(texts.big)}},
|
||||
|
Reference in New Issue
Block a user