From 077f16f882e2f6bbc27829d63ddf2974b6401290 Mon Sep 17 00:00:00 2001 From: YorkShen Date: Wed, 11 Jul 2018 10:11:02 +0800 Subject: [PATCH] * [Core] Fix "flex-grow" problem on text https://jsplayground.taobao.org/raxplayground/97efee70-775f-45a6-b07d-d84c8d1b4387 --- weex_core/Source/core/layout/layout.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/weex_core/Source/core/layout/layout.cpp b/weex_core/Source/core/layout/layout.cpp index eeac11c847..f2d944ee50 100644 --- a/weex_core/Source/core/layout/layout.cpp +++ b/weex_core/Source/core/layout/layout.cpp @@ -467,6 +467,11 @@ namespace WeexCore { if (isMainAxisHorizontal(this)) { child->setWidthMeasureMode(kExactly); child->setLayoutWidth(childMainSize); + //TODO Fix https://jsplayground.taobao.org/raxplayground/97efee70-775f-45a6-b07d-d84c8d1b4387 + //TODO This is just a temporary fix, we need to make things beauty and clean. + if(child->heightMeasureMode == kUnspecified && child->measureFunc != nullptr && child->getChildCount() == 0){ + child->setLayoutHeight(NAN); + } } else { child->setHeightMeasureMode(kExactly); child->setLayoutHeight(childMainSize);