remove horizontal/vertical support
This commit is contained in:
@@ -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'
|
||||
|
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user