added initial margin auto support
use leading and trailing instead of hardcoded ygedge correctly apply margin auto on crossAxis enum.py and reformat reformat delete formating file revert unrelated changes add spaces apply justifycontent only if there aren't any auto margins fix enum definition rerun format apply auto as default values to width, height and flexBasis to conform with spec code review and additional tests added missing language bindings for c# and java regen tests added initial margin auto support use leading and trailing instead of hardcoded ygedge correctly apply margin auto on crossAxis enum.py and reformat delete formating file revert unrelated changes add spaces apply justifycontent only if there aren't any auto margins fix enum definition rerun format apply auto as default values to width, height and flexBasis to conform with spec code review and additional tests added missing language bindings for c# and java fix up rebase add javascript test another fix up
This commit is contained in:
@@ -378,6 +378,12 @@ public class YogaNode implements YogaNodeAPI<YogaNode> {
|
||||
jni_YGNodeStyleSetFlexBasisPercent(mNativePointer, percent);
|
||||
}
|
||||
|
||||
private native void jni_YGNodeStyleSetFlexBasisAuto(long nativePointer);
|
||||
@Override
|
||||
public void setFlexBasisAuto() {
|
||||
jni_YGNodeStyleSetFlexBasisAuto(mNativePointer);
|
||||
}
|
||||
|
||||
private native Object jni_YGNodeStyleGetMargin(long nativePointer, int edge);
|
||||
@Override
|
||||
public YogaValue getMargin(YogaEdge edge) {
|
||||
@@ -401,6 +407,13 @@ public class YogaNode implements YogaNodeAPI<YogaNode> {
|
||||
jni_YGNodeStyleSetMarginPercent(mNativePointer, edge.intValue(), percent);
|
||||
}
|
||||
|
||||
private native void jni_YGNodeStyleSetMarginAuto(long nativePointer, int edge);
|
||||
@Override
|
||||
public void setMarginAuto(YogaEdge edge) {
|
||||
mHasSetMargin = true;
|
||||
jni_YGNodeStyleSetMarginAuto(mNativePointer, edge.intValue());
|
||||
}
|
||||
|
||||
private native Object jni_YGNodeStyleGetPadding(long nativePointer, int edge);
|
||||
@Override
|
||||
public YogaValue getPadding(YogaEdge edge) {
|
||||
@@ -481,6 +494,12 @@ public class YogaNode implements YogaNodeAPI<YogaNode> {
|
||||
jni_YGNodeStyleSetWidthPercent(mNativePointer, percent);
|
||||
}
|
||||
|
||||
private native void jni_YGNodeStyleSetWidthAuto(long nativePointer);
|
||||
@Override
|
||||
public void setWidthAuto() {
|
||||
jni_YGNodeStyleSetWidthAuto(mNativePointer);
|
||||
}
|
||||
|
||||
private native Object jni_YGNodeStyleGetHeight(long nativePointer);
|
||||
@Override
|
||||
public YogaValue getHeight() {
|
||||
@@ -499,6 +518,12 @@ public class YogaNode implements YogaNodeAPI<YogaNode> {
|
||||
jni_YGNodeStyleSetHeightPercent(mNativePointer, percent);
|
||||
}
|
||||
|
||||
private native void jni_YGNodeStyleSetHeightAuto(long nativePointer);
|
||||
@Override
|
||||
public void setHeightAuto() {
|
||||
jni_YGNodeStyleSetHeightAuto(mNativePointer);
|
||||
}
|
||||
|
||||
private native Object jni_YGNodeStyleGetMinWidth(long nativePointer);
|
||||
@Override
|
||||
public YogaValue getMinWidth() {
|
||||
|
@@ -15,7 +15,8 @@ import com.facebook.proguard.annotations.DoNotStrip;
|
||||
public enum YogaUnit {
|
||||
UNDEFINED(0),
|
||||
PIXEL(1),
|
||||
PERCENT(2);
|
||||
PERCENT(2),
|
||||
AUTO(3);
|
||||
|
||||
private int mIntValue;
|
||||
|
||||
@@ -32,6 +33,7 @@ public enum YogaUnit {
|
||||
case 0: return UNDEFINED;
|
||||
case 1: return PIXEL;
|
||||
case 2: return PERCENT;
|
||||
case 3: return AUTO;
|
||||
default: throw new IllegalArgumentException("Unknown enum value: " + value);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user