Resolve direction function is now as a method on YGNode

Summary: Resolve direction function is now as a method on YGNode

Reviewed By: emilsjolander

Differential Revision: D6711755

fbshipit-source-id: a0e80596e10f0c7fb7a31b75377da4db846c4bbb
This commit is contained in:
Pritesh Nandgaonkar
2018-01-15 10:09:50 -08:00
committed by Facebook Github Bot
parent 9d6af5b314
commit 0a04bd7f2f
3 changed files with 12 additions and 12 deletions

View File

@@ -510,6 +510,15 @@ void YGNode::resolveDimension() {
}
}
YGDirection YGNode::resolveDirection(const YGDirection parentDirection) {
if (style_.direction == YGDirectionInherit) {
return parentDirection > YGDirectionInherit ? parentDirection
: YGDirectionLTR;
} else {
return style_.direction;
}
}
void YGNode::clearChildren() {
children_.clear();
children_.shrink_to_fit();