Move trailing padding function as a method on YGNode
Summary: Move trailing padding function as a method on YGNode Reviewed By: emilsjolander Differential Revision: D6711897 fbshipit-source-id: fa2e1a8e31242358a6e94aef51368e2c2c58b79d
This commit is contained in:
committed by
Facebook Github Bot
parent
adb2e0fdd6
commit
130b5beca2
@@ -645,3 +645,18 @@ float YGNode::getLeadingPadding(
|
||||
widthSize),
|
||||
0.0f);
|
||||
}
|
||||
|
||||
float YGNode::getTrailingPadding(
|
||||
const YGFlexDirection axis,
|
||||
const float widthSize) {
|
||||
if (YGFlexDirectionIsRow(axis) &&
|
||||
style_.padding[YGEdgeEnd].unit != YGUnitUndefined &&
|
||||
YGResolveValue(style_.padding[YGEdgeEnd], widthSize) >= 0.0f) {
|
||||
return YGResolveValue(style_.padding[YGEdgeEnd], widthSize);
|
||||
}
|
||||
return fmaxf(
|
||||
YGResolveValue(
|
||||
*YGComputedEdgeValue(style_.padding, trailing[axis], &YGValueZero),
|
||||
widthSize),
|
||||
0.0f);
|
||||
}
|
||||
|
Reference in New Issue
Block a user