Moved getTrailingPosition function as a method on YGNode
Summary: Moved getTrailingPosition function as a method on YGNode Reviewed By: emilsjolander Differential Revision: D6683205 fbshipit-source-id: d30003d90d634c644d92c833e58165b073d4d13e
This commit is contained in:
committed by
Facebook Github Bot
parent
b985b6c377
commit
681b580fd8
@@ -102,6 +102,25 @@ float YGNode::getLeadingPosition(
|
||||
: YGResolveValue(*leadingPosition, axisSize);
|
||||
}
|
||||
|
||||
float YGNode::getTrailingPosition(
|
||||
const YGFlexDirection axis,
|
||||
const float axisSize) {
|
||||
if (YGFlexDirectionIsRow(axis)) {
|
||||
const YGValue* trailingPosition =
|
||||
YGComputedEdgeValue(style_.position, YGEdgeEnd, &YGValueUndefined);
|
||||
if (trailingPosition->unit != YGUnitUndefined) {
|
||||
return YGResolveValue(*trailingPosition, axisSize);
|
||||
}
|
||||
}
|
||||
|
||||
const YGValue* trailingPosition =
|
||||
YGComputedEdgeValue(style_.position, trailing[axis], &YGValueUndefined);
|
||||
|
||||
return trailingPosition->unit == YGUnitUndefined
|
||||
? 0.0f
|
||||
: YGResolveValue(*trailingPosition, axisSize);
|
||||
}
|
||||
|
||||
bool YGNode::isLeadingPositionDefined(const YGFlexDirection axis) {
|
||||
return (YGFlexDirectionIsRow(axis) &&
|
||||
YGComputedEdgeValue(style_.position, YGEdgeStart, &YGValueUndefined)
|
||||
|
Reference in New Issue
Block a user