JS bindings for setAlwaysFormsContainingBlock (#1541)
Summary: Pull Request resolved: https://github.com/facebook/yoga/pull/1541 tsia Reviewed By: NickGerleman Differential Revision: D52608426 fbshipit-source-id: 19fa01d87cbae3457adb9cdb9e0cb602b7afa619
This commit is contained in:
committed by
Facebook GitHub Bot
parent
47e9f33eb4
commit
e4ab593686
@@ -468,3 +468,7 @@ double Node::getComputedBorder(int edge) const {
|
||||
double Node::getComputedPadding(int edge) const {
|
||||
return YGNodeLayoutGetPadding(m_node, static_cast<YGEdge>(edge));
|
||||
}
|
||||
|
||||
void Node::setAlwaysFormsContainingBlock(bool alwaysFormsContainingBlock) {
|
||||
return YGNodeSetAlwaysFormContainingBlock(m_node, alwaysFormsContainingBlock);
|
||||
}
|
||||
|
@@ -223,4 +223,7 @@ class Node {
|
||||
|
||||
std::unique_ptr<MeasureCallback> m_measureFunc;
|
||||
std::unique_ptr<DirtiedCallback> m_dirtiedFunc;
|
||||
|
||||
public:
|
||||
void setAlwaysFormsContainingBlock(bool alwaysFormContainingBlock);
|
||||
};
|
||||
|
@@ -160,6 +160,9 @@ EMSCRIPTEN_BINDINGS(YOGA_LAYOUT) {
|
||||
.function("getParent", &Node::getParent, allow_raw_pointers())
|
||||
.function("getChild", &Node::getChild, allow_raw_pointers())
|
||||
|
||||
.function(
|
||||
"setAlwaysFormsContainingBlock", &Node::setAlwaysFormsContainingBlock)
|
||||
|
||||
.function("isReferenceBaseline", &Node::isReferenceBaseline)
|
||||
.function("setIsReferenceBaseline", &Node::setIsReferenceBaseline)
|
||||
|
||||
|
@@ -168,6 +168,7 @@ export type Node = {
|
||||
setWidthPercent(width: number | undefined): void;
|
||||
unsetDirtiedFunc(): void;
|
||||
unsetMeasureFunc(): void;
|
||||
setAlwaysFormsContainingBlock(alwaysFormsContainingBlock: boolean): void;
|
||||
};
|
||||
|
||||
export type Yoga = {
|
||||
|
Reference in New Issue
Block a user