Fix absolute position if wrap-reverse and align-items: flex-end

Summary:
This is a fix on top of 56b10fc. It takes the case into account were you have `wrap-reverse` and `align-items: flex-end` set.
Closes https://github.com/facebook/yoga/pull/568

Differential Revision: D5155521

Pulled By: emilsjolander

fbshipit-source-id: 7e5fcfa2fbb48b6c6279da46cc648a071ff2b079
This commit is contained in:
Lukas Wöhrl 2017-06-01 05:30:17 -07:00 committed by Facebook Github Bot
parent c57545eecc
commit 7c980c5ba5

View File

@ -1714,7 +1714,7 @@ static void YGNodeAbsoluteLayoutChild(const YGNodeRef node,
child->layout.measuredDimensions[dim[crossAxis]]) /
2.0f;
} else if (!YGNodeIsLeadingPosDefined(child, crossAxis) &&
(YGNodeAlignItem(node, child) == YGAlignFlexEnd || node->style.flexWrap == YGWrapWrapReverse)) {
((YGNodeAlignItem(node, child) == YGAlignFlexEnd) ^ (node->style.flexWrap == YGWrapWrapReverse))) {
child->layout.position[leading[crossAxis]] = (node->layout.measuredDimensions[dim[crossAxis]] -
child->layout.measuredDimensions[dim[crossAxis]]);
}