Reset child position/sizes before calculating layout
This commit is contained in:
@@ -41,7 +41,6 @@ describe('Javascript Only', function() {
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
describe('Layout', function() {
|
||||
it('should layout a single node with width and height', function() {
|
||||
testLayout({
|
||||
@@ -2459,6 +2458,31 @@ describe('Layout', function() {
|
||||
]}
|
||||
);
|
||||
});
|
||||
|
||||
it('should center items correctly inside a stretched layout', function() {
|
||||
testLayout(
|
||||
{style: {flexDirection: 'row'}, children: [
|
||||
{style: {}, children: [
|
||||
{style: {width: 100, height: 100}}
|
||||
]},
|
||||
{style: {width: 100}, children: [
|
||||
{style: {flexDirection: 'column', alignItems: 'center'}, children: [
|
||||
{style: {width: 50, height: 50}},
|
||||
]},
|
||||
]},
|
||||
]},
|
||||
{width: 200, height: 100, top: 0, left: 0, children: [
|
||||
{width: 100, height: 100, top: 0, left: 0, children: [
|
||||
{width: 100, height: 100, top: 0, left: 0}
|
||||
]},
|
||||
{width: 100, height: 100, top: 0, left: 100, children: [
|
||||
{width: 100, height: 50, top: 0, left: 0, children: [
|
||||
{width: 50, height: 50, top: 0, left: 25}
|
||||
]},
|
||||
]},
|
||||
]}
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
describe('Layout alignContent', function() {
|
||||
|
Reference in New Issue
Block a user