mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-24 04:16:00 +08:00
Add getParent() method for easier migration
Reviewed By: emilsjolander Differential Revision: D7654526 fbshipit-source-id: efe44807caa97f495c5e5691dedcf281760fa23e
This commit is contained in:
committed by
Facebook Github Bot
parent
864cc00a61
commit
aa6239301a
@@ -239,6 +239,13 @@ public class YogaNode implements Cloneable {
|
|||||||
return mOwner;
|
return mOwner;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** @deprecated Use #getOwner() instead. This will be removed in the next version. */
|
||||||
|
@Deprecated
|
||||||
|
@Nullable
|
||||||
|
YogaNode getParent() {
|
||||||
|
return getOwner();
|
||||||
|
}
|
||||||
|
|
||||||
public int indexOf(YogaNode child) {
|
public int indexOf(YogaNode child) {
|
||||||
return mChildren == null ? -1 : mChildren.indexOf(child);
|
return mChildren == null ? -1 : mChildren.indexOf(child);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user