Moved isLeadingPos defined as a method on YGNode

Summary: Moved isLeadingPos defined as a method on YGNode

Reviewed By: emilsjolander

Differential Revision: D6682956

fbshipit-source-id: 31c60e0eae906e1434a6969f3cd786fcaf9097a5
This commit is contained in:
Pritesh Nandgaonkar
2018-01-11 04:47:38 -08:00
committed by Facebook Github Bot
parent 0cfdb50477
commit 92eda21e78
4 changed files with 24 additions and 24 deletions

View File

@@ -102,6 +102,14 @@ float YGNode::getLeadingPosition(
: YGResolveValue(*leadingPosition, axisSize);
}
bool YGNode::isLeadingPositionDefined(const YGFlexDirection axis) {
return (YGFlexDirectionIsRow(axis) &&
YGComputedEdgeValue(style_.position, YGEdgeStart, &YGValueUndefined)
->unit != YGUnitUndefined) ||
YGComputedEdgeValue(style_.position, leading[axis], &YGValueUndefined)
->unit != YGUnitUndefined;
}
// Setters
void YGNode::setContext(void* context) {