Always return undefined value if nothing is set
Reviewed By: astreet Differential Revision: D4531779 fbshipit-source-id: 97a789e70dcf0fb5174e2039991e7a2b27f45f01
This commit is contained in:
parent
21475e58b3
commit
5194e0349c
|
@ -382,7 +382,7 @@ public class YogaNode implements YogaNodeAPI<YogaNode> {
|
|||
@Override
|
||||
public YogaValue getMargin(YogaEdge edge) {
|
||||
if (!mHasSetMargin) {
|
||||
return edge.intValue() < YogaEdge.START.intValue() ? YogaValue.ZERO : YogaValue.UNDEFINED;
|
||||
return YogaValue.UNDEFINED;
|
||||
}
|
||||
return (YogaValue) jni_YGNodeStyleGetMargin(mNativePointer, edge.intValue());
|
||||
}
|
||||
|
@ -405,7 +405,7 @@ public class YogaNode implements YogaNodeAPI<YogaNode> {
|
|||
@Override
|
||||
public YogaValue getPadding(YogaEdge edge) {
|
||||
if (!mHasSetPadding) {
|
||||
return edge.intValue() < YogaEdge.START.intValue() ? YogaValue.ZERO : YogaValue.UNDEFINED;
|
||||
return YogaValue.UNDEFINED;
|
||||
}
|
||||
return (YogaValue) jni_YGNodeStyleGetPadding(mNativePointer, edge.intValue());
|
||||
}
|
||||
|
@ -428,7 +428,7 @@ public class YogaNode implements YogaNodeAPI<YogaNode> {
|
|||
@Override
|
||||
public float getBorder(YogaEdge edge) {
|
||||
if (!mHasSetBorder) {
|
||||
return edge.intValue() < YogaEdge.START.intValue() ? 0 : YogaConstants.UNDEFINED;
|
||||
return YogaConstants.UNDEFINED;
|
||||
}
|
||||
return jni_YGNodeStyleGetBorder(mNativePointer, edge.intValue());
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue