Remove flex shorthand getter because it doesnt make a lot of sense
Summary: It doesn't make sense to have a getter for the shorthand as it is the computed flexGrow and flexShrink values that you should care about. Reviewed By: gkassabli Differential Revision: D4064674 fbshipit-source-id: 69935b85042020b4e8c61a393c1be8f4d42a6674
This commit is contained in:
committed by
Facebook Github Bot
parent
c28429efc8
commit
4c57029a28
@@ -295,13 +295,6 @@ public class CSSNode implements CSSNodeAPI<CSSNode> {
|
||||
jni_CSSNodeStyleSetOverflow(mNativePointer, overflow.ordinal());
|
||||
}
|
||||
|
||||
private native float jni_CSSNodeStyleGetFlex(long nativePointer);
|
||||
@Override
|
||||
public float getFlex() {
|
||||
assertNativeInstance();
|
||||
return jni_CSSNodeStyleGetFlex(mNativePointer);
|
||||
}
|
||||
|
||||
private native void jni_CSSNodeStyleSetFlex(long nativePointer, float flex);
|
||||
@Override
|
||||
public void setFlex(float flex) {
|
||||
|
@@ -52,7 +52,6 @@ public interface CSSNodeAPI<CSSNodeType extends CSSNodeAPI> {
|
||||
CSSPositionType getPositionType();
|
||||
void setPositionType(CSSPositionType positionType);
|
||||
void setWrap(CSSWrap flexWrap);
|
||||
float getFlex();
|
||||
void setFlex(float flex);
|
||||
float getFlexGrow();
|
||||
void setFlexGrow(float flexGrow);
|
||||
|
@@ -358,20 +358,6 @@ public class CSSNodeDEPRECATED implements CSSNodeAPI<CSSNodeDEPRECATED> {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get this node's flex, as defined by style.
|
||||
*/
|
||||
@Override
|
||||
public float getFlex() {
|
||||
if (style.flexGrow > 0) {
|
||||
return style.flexGrow;
|
||||
} else if (style.flexShrink > 0) {
|
||||
return -style.flexShrink;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFlex(float flex) {
|
||||
if (CSSConstants.isUndefined(flex) || flex == 0) {
|
||||
|
Reference in New Issue
Block a user