Add getParent() method for easier migration

Reviewed By: emilsjolander

Differential Revision: D7654526

fbshipit-source-id: efe44807caa97f495c5e5691dedcf281760fa23e
This commit is contained in:
Pascal Hartig 2018-04-18 04:29:45 -07:00 committed by Facebook Github Bot
parent 864cc00a61
commit aa6239301a
1 changed files with 7 additions and 0 deletions

View File

@ -239,6 +239,13 @@ public class YogaNode implements Cloneable {
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) {
return mChildren == null ? -1 : mChildren.indexOf(child);
}