Expose box sizing getters and setters in Yoga (#1701)
Summary: Pull Request resolved: https://github.com/facebook/yoga/pull/1701 X-link: https://github.com/facebook/react-native/pull/46630 I would like to write some tests for box sizing that will drive a lot of my development as I implement content box. To do that, I need this publicly exposed. Obviously not that ideal since this currently does not do anything. Maybe we can name the value in such a way that its clear it is in development? Changelog: [Internal] Reviewed By: NickGerleman Differential Revision: D63135970 fbshipit-source-id: 7520823bf925364eae45341531e012e80ec92284
This commit is contained in:
committed by
Facebook GitHub Bot
parent
6212e561ad
commit
43d920eab0
@@ -75,6 +75,10 @@ void Node::copyStyle(Node const& other) {
|
||||
YGNodeCopyStyle(m_node, other.m_node);
|
||||
}
|
||||
|
||||
void Node::setBoxSizing(int boxSizing) {
|
||||
YGNodeStyleSetBoxSizing(m_node, static_cast<YGBoxSizing>(boxSizing));
|
||||
}
|
||||
|
||||
void Node::setPositionType(int positionType) {
|
||||
YGNodeStyleSetPositionType(m_node, static_cast<YGPositionType>(positionType));
|
||||
}
|
||||
@@ -248,6 +252,10 @@ void Node::setGapPercent(int gutter, double gapLength) {
|
||||
YGNodeStyleSetGapPercent(m_node, static_cast<YGGutter>(gutter), gapLength);
|
||||
}
|
||||
|
||||
int Node::getBoxSizing(void) const {
|
||||
return YGNodeStyleGetBoxSizing(m_node);
|
||||
}
|
||||
|
||||
int Node::getPositionType(void) const {
|
||||
return YGNodeStyleGetPositionType(m_node);
|
||||
}
|
||||
|
Reference in New Issue
Block a user