From aa6239301ab2eae2aefb44b024e18e5d5ee9be99 Mon Sep 17 00:00:00 2001 From: Pascal Hartig Date: Wed, 18 Apr 2018 04:29:45 -0700 Subject: [PATCH] Add getParent() method for easier migration Reviewed By: emilsjolander Differential Revision: D7654526 fbshipit-source-id: efe44807caa97f495c5e5691dedcf281760fa23e --- ReactAndroid/src/main/java/com/facebook/yoga/YogaNode.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ReactAndroid/src/main/java/com/facebook/yoga/YogaNode.java b/ReactAndroid/src/main/java/com/facebook/yoga/YogaNode.java index 59a14d242..fdb5b4be5 100644 --- a/ReactAndroid/src/main/java/com/facebook/yoga/YogaNode.java +++ b/ReactAndroid/src/main/java/com/facebook/yoga/YogaNode.java @@ -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); }