diff --git a/src/Layout.c b/src/Layout.c index e7a80179..b1eac62f 100644 --- a/src/Layout.c +++ b/src/Layout.c @@ -833,7 +833,7 @@ static void layoutNodeImpl(css_node_t *node, float parentMaxWidth, css_direction // We use justifyContent to figure out how to allocate the remaining // space available - } else { + } else if (node->style.justify_content != CSS_JUSTIFY_FLEX_START) { css_justify_t justifyContent = node->style.justify_content; if (justifyContent == CSS_JUSTIFY_CENTER) { leadingMainDim = remainingMainDim / 2; diff --git a/src/Layout.js b/src/Layout.js index bbd13387..52525a08 100755 --- a/src/Layout.js +++ b/src/Layout.js @@ -20,7 +20,7 @@ var computeLayout = (function() { var CSS_FLEX_DIRECTION_COLUMN = 'column'; var CSS_FLEX_DIRECTION_COLUMN_REVERSE = 'column-reverse'; - // var CSS_JUSTIFY_FLEX_START = 'flex-start'; + var CSS_JUSTIFY_FLEX_START = 'flex-start'; var CSS_JUSTIFY_CENTER = 'center'; var CSS_JUSTIFY_FLEX_END = 'flex-end'; var CSS_JUSTIFY_SPACE_BETWEEN = 'space-between'; @@ -701,7 +701,7 @@ var computeLayout = (function() { // We use justifyContent to figure out how to allocate the remaining // space available - } else { + } else if (getJustifyContent(node) !== CSS_JUSTIFY_FLEX_START) { var/*css_justify_t*/ justifyContent = getJustifyContent(node); if (justifyContent === CSS_JUSTIFY_CENTER) { leadingMainDim = remainingMainDim / 2; diff --git a/src/java/src/com/facebook/csslayout/LayoutEngine.java b/src/java/src/com/facebook/csslayout/LayoutEngine.java index a251ad9b..527a3d94 100644 --- a/src/java/src/com/facebook/csslayout/LayoutEngine.java +++ b/src/java/src/com/facebook/csslayout/LayoutEngine.java @@ -650,7 +650,7 @@ public class LayoutEngine { // We use justifyContent to figure out how to allocate the remaining // space available - } else { + } else if (node.style.justifyContent != CSSJustify.FLEX_START) { CSSJustify justifyContent = node.style.justifyContent; if (justifyContent == CSSJustify.CENTER) { leadingMainDim = remainingMainDim / 2;