Moved getLeadingMargin as a function on YGNode
Summary: Moved getLeadingMargin as a function on YGNode Reviewed By: emilsjolander Differential Revision: D6683270 fbshipit-source-id: a26663006419e13cb783e9849183e3c665f59b3c
This commit is contained in:
committed by
Facebook Github Bot
parent
681b580fd8
commit
a65b79a944
@@ -137,6 +137,19 @@ bool YGNode::isTrailingPosDefined(const YGFlexDirection axis) {
|
||||
->unit != YGUnitUndefined;
|
||||
}
|
||||
|
||||
float YGNode::getLeadingMargin(
|
||||
const YGFlexDirection axis,
|
||||
const float widthSize) {
|
||||
if (YGFlexDirectionIsRow(axis) &&
|
||||
style_.margin[YGEdgeStart].unit != YGUnitUndefined) {
|
||||
return YGResolveValueMargin(style_.margin[YGEdgeStart], widthSize);
|
||||
}
|
||||
|
||||
return YGResolveValueMargin(
|
||||
*YGComputedEdgeValue(style_.margin, leading[axis], &YGValueZero),
|
||||
widthSize);
|
||||
}
|
||||
|
||||
// Setters
|
||||
|
||||
void YGNode::setContext(void* context) {
|
||||
|
Reference in New Issue
Block a user