Moved trailingmargin function as a method on YGNode
Summary: Moved trailingmargin function as a method on YGNode Reviewed By: emilsjolander Differential Revision: D6683313 fbshipit-source-id: 5ee458c2f4698768724901df0e3f5d8805c7c8f5
This commit is contained in:
committed by
Facebook Github Bot
parent
a65b79a944
commit
f2ba14c309
@@ -150,6 +150,19 @@ float YGNode::getLeadingMargin(
|
||||
widthSize);
|
||||
}
|
||||
|
||||
float YGNode::getTrailingMargin(
|
||||
const YGFlexDirection axis,
|
||||
const float widthSize) {
|
||||
if (YGFlexDirectionIsRow(axis) &&
|
||||
style_.margin[YGEdgeEnd].unit != YGUnitUndefined) {
|
||||
return YGResolveValueMargin(style_.margin[YGEdgeEnd], widthSize);
|
||||
}
|
||||
|
||||
return YGResolveValueMargin(
|
||||
*YGComputedEdgeValue(style_.margin, trailing[axis], &YGValueZero),
|
||||
widthSize);
|
||||
}
|
||||
|
||||
// Setters
|
||||
|
||||
void YGNode::setContext(void* context) {
|
||||
|
Reference in New Issue
Block a user