mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-09 22:43:10 +08:00
CSSNodeCopyStyle API for Java and C#
Reviewed By: emilsjolander Differential Revision: D4189954 fbshipit-source-id: 10759fdb27bf67350d3151614f7815aa09bf7e04
This commit is contained in:
committed by
Facebook Github Bot
parent
39a59caac1
commit
2af1de283c
@@ -190,6 +190,12 @@ public class CSSNode implements CSSNodeAPI<CSSNode> {
|
||||
jni_CSSNodeMarkLayoutSeen(mNativePointer);
|
||||
}
|
||||
|
||||
private native void jni_CSSNodeCopyStyle(long dstNativePointer, long srcNativePointer);
|
||||
@Override
|
||||
public void copyStyle(CSSNode srcNode) {
|
||||
jni_CSSNodeCopyStyle(mNativePointer, srcNode.mNativePointer);
|
||||
}
|
||||
|
||||
private native int jni_CSSNodeStyleGetDirection(long nativePointer);
|
||||
@Override
|
||||
public CSSDirection getStyleDirection() {
|
||||
|
||||
@@ -37,6 +37,7 @@ public interface CSSNodeAPI<CSSNodeType extends CSSNodeAPI> {
|
||||
void dirty();
|
||||
void markLayoutSeen();
|
||||
boolean valuesEqual(float f1, float f2);
|
||||
void copyStyle(CSSNodeType srcNode);
|
||||
CSSDirection getStyleDirection();
|
||||
void setDirection(CSSDirection direction);
|
||||
CSSFlexDirection getFlexDirection();
|
||||
|
||||
@@ -222,6 +222,11 @@ public class CSSNodeDEPRECATED implements CSSNodeAPI<CSSNodeDEPRECATED> {
|
||||
return FloatUtil.floatsEqual(f1, f2);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void copyStyle(CSSNodeDEPRECATED srcNode) {
|
||||
throw new UnsupportedOperationException("copyStyle is not implemented");
|
||||
}
|
||||
|
||||
/**
|
||||
* Get this node's direction, as defined in the style.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user