enums for csharp and java
This commit is contained in:
@@ -16,5 +16,6 @@ namespace Facebook.Yoga
|
||||
Center,
|
||||
FlexEnd,
|
||||
Stretch,
|
||||
Baseline,
|
||||
}
|
||||
}
|
||||
|
@@ -100,7 +100,7 @@ JavaEmitter.prototype = Object.create(Emitter.prototype, {
|
||||
YGAlignFlexEnd:{value:'YogaAlign.FLEX_END'},
|
||||
YGAlignFlexStart:{value:'YogaAlign.FLEX_START'},
|
||||
YGAlignStretch:{value:'YogaAlign.STRETCH'},
|
||||
YGAlignBaseline:{value:'YogaAlign.Baseline'},
|
||||
YGAlignBaseline:{value:'YogaAlign.BASELINE'},
|
||||
|
||||
YGDirectionInherit:{value:'YogaDirection.INHERIT'},
|
||||
YGDirectionLTR:{value:'YogaDirection.LTR'},
|
||||
|
@@ -17,7 +17,8 @@ public enum YogaAlign {
|
||||
FLEX_START(1),
|
||||
CENTER(2),
|
||||
FLEX_END(3),
|
||||
STRETCH(4);
|
||||
STRETCH(4),
|
||||
BASELINE(5);
|
||||
|
||||
private int mIntValue;
|
||||
|
||||
@@ -36,6 +37,7 @@ public enum YogaAlign {
|
||||
case 2: return CENTER;
|
||||
case 3: return FLEX_END;
|
||||
case 4: return STRETCH;
|
||||
case 5: return BASELINE;
|
||||
default: throw new IllegalArgumentException("Unkown enum value: " + value);
|
||||
}
|
||||
}
|
||||
|
@@ -20,7 +20,7 @@ public class YGAlignBaseline {
|
||||
public void test_align_baseline() {
|
||||
final YogaNode root = new YogaNode();
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
root.setAlignItems(YogaAlign.Baseline);
|
||||
root.setAlignItems(YogaAlign.BASELINE);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
@@ -74,7 +74,7 @@ public class YGAlignBaseline {
|
||||
public void test_align_baseline_child() {
|
||||
final YogaNode root = new YogaNode();
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
root.setAlignItems(YogaAlign.Baseline);
|
||||
root.setAlignItems(YogaAlign.BASELINE);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
@@ -143,7 +143,7 @@ public class YGAlignBaseline {
|
||||
public void test_align_baseline_double_nested_child() {
|
||||
final YogaNode root = new YogaNode();
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
root.setAlignItems(YogaAlign.Baseline);
|
||||
root.setAlignItems(YogaAlign.BASELINE);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
@@ -226,7 +226,7 @@ public class YGAlignBaseline {
|
||||
@Test
|
||||
public void test_align_baseline_column() {
|
||||
final YogaNode root = new YogaNode();
|
||||
root.setAlignItems(YogaAlign.Baseline);
|
||||
root.setAlignItems(YogaAlign.BASELINE);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
|
Reference in New Issue
Block a user