simple top left

This commit is contained in:
Christopher Chedeau
2014-04-16 15:26:15 -07:00
parent 93ee721ba8
commit 2471dbe49a
2 changed files with 21 additions and 2 deletions

View File

@@ -9,6 +9,7 @@ var iframe = (function() {
style.innerText = (function() {/*
body, div {
box-sizing: border-box;
position: relative;
display: flex;
flex-direction: column;
@@ -46,6 +47,8 @@ function computeDOMLayout(node) {
var div = document.createElement('div');
transfer(div, node, 'width', 'px');
transfer(div, node, 'height', 'px');
transfer(div, node, 'top', 'px');
transfer(div, node, 'left', 'px');
transferSpacing(div, node, 'margin');
transferSpacing(div, node, 'padding');
transfer(div, node, 'flexDirection');
@@ -539,6 +542,13 @@ describe('Layout', function() {
);
});
it('should layout node with top', function() {
testLayout(
{style: {top: 5, left: 5}},
{width: 0, height: 0, top: 5, left: 5}
);
});
it('should layout randomly', function() {
function RNG(seed) {
this.state = seed;