text with padding and margin

This commit is contained in:
Christopher Chedeau
2014-04-26 17:11:22 -07:00
parent 8ca7bd0ccb
commit 61919a1b2f
3 changed files with 41 additions and 28 deletions

View File

@@ -217,8 +217,12 @@ var computeLayout = (function() {
if ('measure' in node.style) {
var dimensions = node.style.measure(node.style.width);
node.layout.width = dimensions.width;
node.layout.height = dimensions.height;
if (!isDimDefined(node, 'row')) {
node.layout.width = dimensions.width + getPaddingAndBorderAxis(node, 'row');
}
if (!isDimDefined(node, 'column')) {
node.layout.height = dimensions.height + getPaddingAndBorderAxis(node, 'column');
}
return;
}