Add YGLayoutGetMargin
Summary: Fix #326. I'll open another PR once this one gets accepted to add support for `YGLayoutGetBorder` 👌 Closes https://github.com/facebook/yoga/pull/335 Reviewed By: gkassabli Differential Revision: D4409399 Pulled By: emilsjolander fbshipit-source-id: 8153f6701cab60b55a485f6d2e0b9f7767481090
This commit is contained in:
committed by
Facebook Github Bot
parent
498a5980e8
commit
d70f289e73
@@ -453,3 +453,13 @@ Layout Node::getComputedLayout(void) const
|
||||
|
||||
return layout;
|
||||
}
|
||||
|
||||
double Node::getComputedMargin(int edge) const
|
||||
{
|
||||
return YGNodeLayoutGetMargin(m_node, static_cast<YGEdge>(edge));
|
||||
}
|
||||
|
||||
double Node::getComputedPadding(int edge) const
|
||||
{
|
||||
return YGNodeLayoutGetPadding(m_node, static_cast<YGEdge>(edge));
|
||||
}
|
||||
|
@@ -176,6 +176,9 @@ class Node {
|
||||
|
||||
Layout getComputedLayout(void) const;
|
||||
|
||||
double getComputedMargin(int edge) const;
|
||||
double getComputedPadding(int edge) const;
|
||||
|
||||
private:
|
||||
|
||||
YGNodeRef m_node;
|
||||
|
@@ -153,4 +153,7 @@ NBIND_CLASS(Node)
|
||||
method(getComputedHeight);
|
||||
|
||||
method(getComputedLayout);
|
||||
|
||||
method(getComputedMargin);
|
||||
method(getComputedPadding);
|
||||
}
|
||||
|
Reference in New Issue
Block a user