support <Text>

This commit is contained in:
Christopher Chedeau
2014-04-26 19:02:16 -07:00
parent 61919a1b2f
commit a0ffafe37d
3 changed files with 40 additions and 7 deletions

View File

@@ -216,7 +216,15 @@ var computeLayout = (function() {
getRelativePosition(node, crossAxis);
if ('measure' in node.style) {
var dimensions = node.style.measure(node.style.width);
var width;
if (isDimDefined(node, 'row')) {
width = node.style.width;
} else if (node.style.position === 'absolute') {
width = 'shrink';
} else {
width = 'grow';
}
var dimensions = node.style.measure(width);
if (!isDimDefined(node, 'row')) {
node.layout.width = dimensions.width + getPaddingAndBorderAxis(node, 'row');
}