double flex and position absolute
This commit is contained in:
@@ -216,7 +216,7 @@ var computeLayout = (function() {
|
||||
}
|
||||
for (var/*int*/ i = 0; i < node.children.length; ++i) {
|
||||
var/*css_node_t**/ child = node.children[i];
|
||||
if (getFlex(child)) {
|
||||
if (getPositionType(child) === 'relative' && getFlex(child)) {
|
||||
child.layout[dim[mainAxis]] = flexibleMainDim +
|
||||
getPadding(child, leading[mainAxis]) +
|
||||
getPadding(child, trailing[mainAxis]);
|
||||
|
@@ -669,7 +669,18 @@ describe('Layout', function() {
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
it('should layout node with double flex and position absolute', function() {
|
||||
testLayout(
|
||||
{style: {height: 500}, children: [
|
||||
{style: {flex: 1}},
|
||||
{style: {flex: 1, position: 'absolute'}}
|
||||
]},
|
||||
{width: 0, height: 500, top: 0, left: 0, children: [
|
||||
{width: 0, height: 500, top: 0, left: 0},
|
||||
{width: 0, height: 0, top: 500, left: 0},
|
||||
]}
|
||||
)
|
||||
});
|
||||
|
||||
|
||||
it('should layout randomly', function() {
|
||||
|
Reference in New Issue
Block a user