Add YGNodeGetParent api
Summary: Fixes https://github.com/facebook/css-layout/issues/248 Reviewed By: gkassabli Differential Revision: D4333456 fbshipit-source-id: 388afd0a01c19a6db73c175bf24c566278832cb9
This commit is contained in:
committed by
Facebook Github Bot
parent
642ea07d6f
commit
88a4e44fd4
@@ -333,6 +333,10 @@ YGNodeRef YGNodeGetChild(const YGNodeRef node, const uint32_t index) {
|
|||||||
return YGNodeListGet(node->children, index);
|
return YGNodeListGet(node->children, index);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
YGNodeRef YGNodeGetParent(const YGNodeRef node) {
|
||||||
|
return node->parent;
|
||||||
|
}
|
||||||
|
|
||||||
inline uint32_t YGNodeChildCount(const YGNodeRef node) {
|
inline uint32_t YGNodeChildCount(const YGNodeRef node) {
|
||||||
return YGNodeListCount(node->children);
|
return YGNodeListCount(node->children);
|
||||||
}
|
}
|
||||||
|
@@ -64,6 +64,7 @@ WIN_EXPORT void YGNodeInsertChild(const YGNodeRef node,
|
|||||||
const uint32_t index);
|
const uint32_t index);
|
||||||
WIN_EXPORT void YGNodeRemoveChild(const YGNodeRef node, const YGNodeRef child);
|
WIN_EXPORT void YGNodeRemoveChild(const YGNodeRef node, const YGNodeRef child);
|
||||||
WIN_EXPORT YGNodeRef YGNodeGetChild(const YGNodeRef node, const uint32_t index);
|
WIN_EXPORT YGNodeRef YGNodeGetChild(const YGNodeRef node, const uint32_t index);
|
||||||
|
WIN_EXPORT YGNodeRef YGNodeGetParent(const YGNodeRef node);
|
||||||
WIN_EXPORT uint32_t YGNodeChildCount(const YGNodeRef node);
|
WIN_EXPORT uint32_t YGNodeChildCount(const YGNodeRef node);
|
||||||
|
|
||||||
WIN_EXPORT void YGNodeCalculateLayout(const YGNodeRef node,
|
WIN_EXPORT void YGNodeCalculateLayout(const YGNodeRef node,
|
||||||
|
Reference in New Issue
Block a user