Moved margin axis function as a method in YGNode

Summary: Moved margin axis function as a method in YGNode

Reviewed By: emilsjolander

Differential Revision: D6900003

fbshipit-source-id: a42da3bcd3126bf8c432c6740987b5ec0b572172
This commit is contained in:
Pritesh Nandgaonkar
2018-02-06 08:39:53 -08:00
committed by Facebook Github Bot
parent 64f6ea37bd
commit 61afbd43c9
3 changed files with 62 additions and 52 deletions

View File

@@ -167,6 +167,12 @@ float YGNode::getTrailingMargin(
widthSize);
}
float YGNode::getMarginForAxis(
const YGFlexDirection axis,
const float widthSize) {
return getLeadingMargin(axis, widthSize) + getTrailingMargin(axis, widthSize);
}
// Setters
void YGNode::setContext(void* context) {