Fix dimension check for STRETCH children
The correct check is on the layout state, no the style.
This commit is contained in:
@@ -934,7 +934,7 @@ static void layoutNodeImpl(css_node_t *node, float parentMaxWidth, css_direction
|
||||
if (alignItem == CSS_ALIGN_STRETCH) {
|
||||
// You can only stretch if the dimension has not already been set
|
||||
// previously.
|
||||
if (!isDimDefined(child, crossAxis)) {
|
||||
if (isUndefined(child->layout.dimensions[dim[crossAxis]])) {
|
||||
child->layout.dimensions[dim[crossAxis]] = fmaxf(
|
||||
boundAxis(child, crossAxis, containerCrossAxis -
|
||||
paddingAndBorderAxisCross - getMarginAxis(child, crossAxis)),
|
||||
|
@@ -802,7 +802,7 @@ var computeLayout = (function() {
|
||||
if (alignItem === CSS_ALIGN_STRETCH) {
|
||||
// You can only stretch if the dimension has not already been set
|
||||
// previously.
|
||||
if (!isDimDefined(child, crossAxis)) {
|
||||
if (isUndefined(child.layout[dim[crossAxis]])) {
|
||||
child.layout[dim[crossAxis]] = fmaxf(
|
||||
boundAxis(child, crossAxis, containerCrossAxis -
|
||||
paddingAndBorderAxisCross - getMarginAxis(child, crossAxis)),
|
||||
|
@@ -751,7 +751,7 @@ public class LayoutEngine {
|
||||
if (alignItem == CSSAlign.STRETCH) {
|
||||
// You can only stretch if the dimension has not already been set
|
||||
// previously.
|
||||
if (!isDimDefined(child, crossAxis)) {
|
||||
if (isUndefined(child.layout.dimensions[dim[crossAxis]])) {
|
||||
child.layout.dimensions[dim[crossAxis]] = Math.max(
|
||||
boundAxis(child, crossAxis, containerCrossAxis -
|
||||
paddingAndBorderAxisCross - getMarginAxis(child, crossAxis)),
|
||||
|
Reference in New Issue
Block a user