Permalink
Browse files

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 facebook/yoga#568

Differential Revision: D5155521

Pulled By: emilsjolander

fbshipit-source-id: 7e5fcfa2fbb48b6c6279da46cc648a071ff2b079
  • Loading branch information...
woehrl01 authored and facebook-github-bot committed Jun 1, 2017
1 parent c57545e commit 7c980c5ba540f8c3d385ac64bc355b7939c5b337
Showing with 1 addition and 1 deletion.
  1. +1 −1 ReactCommon/yoga/yoga/Yoga.c
@@ -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]]);
}

0 comments on commit 7c980c5

Please sign in to comment.