initial support for text layout

This commit is contained in:
Christopher Chedeau
2014-04-26 12:16:27 -07:00
parent 6fdd724820
commit c06f48c45f
5 changed files with 21 additions and 4 deletions

View File

@@ -744,6 +744,13 @@ describe('Layout', function() {
)
});
it('should layout node with text', function() {
testLayout(
{style: {text: 'kikoo'}},
{width: 36, height: 18, top: 0, left: 0}
)
});
it('should layout randomly', function() {
@@ -806,7 +813,7 @@ describe('Layout', function() {
return node;
}
for (var i = 0; i < 1000; ++i) {
for (var i = 0; i < 100; ++i) {
var node = generateRandomNode();
if (JSON.stringify(computeLayout(node)) !== JSON.stringify(computeDOMLayout(node))) {
node = reduceTest(node);