diff --git a/src/Layout.js b/src/Layout.js index 0c382b1b..bb1ec11f 100755 --- a/src/Layout.js +++ b/src/Layout.js @@ -30,11 +30,6 @@ function computeLayout(node) { return node.style[key]; } - key = type + capitalizeFirst(axis[location]); - if (key in node.style) { - return node.style[key]; - } - if (type in node.style) { return node.style[type]; } @@ -100,12 +95,6 @@ function computeLayout(node) { return -getPosition(node, trailing[axis]); } - var axis = { - left: 'horizontal', - right: 'horizontal', - top: 'vertical', - bottom: 'vertical' - }; var leading = { row: 'left', column: 'top' diff --git a/src/__tests__/Layout-test.js b/src/__tests__/Layout-test.js index 79f38bd3..31cdda0d 100755 --- a/src/__tests__/Layout-test.js +++ b/src/__tests__/Layout-test.js @@ -622,11 +622,12 @@ describe('Layout', function() { randMinMax(node, 0.1, 'bottom', -10, 10); randSpacing(node, 0.1, 'margin', 0, 20); randSpacing(node, 0.1, 'padding', 0, 20); - randEnum(node, 0.1, 'flexDirection', ['row', 'column']); + randEnum(node, 0.1, 'flexDirection', ['column', 'row']); randEnum(node, 0.1, 'justifyContent', ['flex-start', 'center', 'flex-end', 'space-between', 'space-around']); randEnum(node, 0.1, 'alignItems', ['flex-start', 'center', 'flex-end', 'stretch']); randEnum(node, 0.1, 'alignSelf', ['flex-start', 'center', 'flex-end', 'stretch']); randEnum(node, 0.1, 'flex', ['none', 1]); +// randEnum(node, 0.1, 'position', ['relative', 'absolute']); randChildren(node, 0.2); return node; }