Move leading border function as a method on YGNode
Summary: Move leading border function as a method on YGNode Reviewed By: emilsjolander Differential Revision: D6711523 fbshipit-source-id: 76e90083a9dd0728dc9557cc3b0a1f431f3afd5d
This commit is contained in:
committed by
Facebook Github Bot
parent
5806f1728c
commit
6efb4b90d4
@@ -596,3 +596,15 @@ bool YGNode::isNodeFlexible() {
|
||||
(style_.positionType == YGPositionTypeRelative) &&
|
||||
(resolveFlexGrow() != 0 || resolveFlexShrink() != 0));
|
||||
}
|
||||
|
||||
float YGNode::getLeadingBorder(const YGFlexDirection axis) {
|
||||
if (YGFlexDirectionIsRow(axis) &&
|
||||
style_.border[YGEdgeStart].unit != YGUnitUndefined &&
|
||||
style_.border[YGEdgeStart].value >= 0.0f) {
|
||||
return style_.border[YGEdgeStart].value;
|
||||
}
|
||||
|
||||
return fmaxf(
|
||||
YGComputedEdgeValue(style_.border, leading[axis], &YGValueZero)->value,
|
||||
0.0f);
|
||||
}
|
||||
|
Reference in New Issue
Block a user