make setting bottom/right calculate top/left

This commit is contained in:
Andrew Rasmussen
2014-09-30 15:24:42 -07:00
parent 91786cd2c7
commit 7eef01f299
4 changed files with 321 additions and 24 deletions

View File

@@ -566,6 +566,16 @@ var computeLayout = (function() {
);
}
}
for (var/*int*/ ii = 0; ii < 2; ii++) {
var/*css_flex_direction_t*/ axis = ii ? CSS_FLEX_DIRECTION_ROW : CSS_FLEX_DIRECTION_COLUMN;
if (isPosDefined(child, trailing[axis]) &&
!isPosDefined(child, leading[axis])) {
child.layout[leading[axis]] =
node.layout[dim[axis]] -
child.layout[dim[axis]] -
getPosition(child, trailing[axis]);
}
}
}
}
};