You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by GitBox <gi...@apache.org> on 2018/10/24 06:42:11 UTC

[GitHub] YorkShen closed pull request #1666: * [Android] Fix text layout problem

YorkShen closed pull request #1666: * [Android] Fix text layout problem
URL: https://github.com/apache/incubator-weex/pull/1666
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/weex_core/Source/core/layout/layout.cpp b/weex_core/Source/core/layout/layout.cpp
index a69fed737d..2310ec153e 100644
--- a/weex_core/Source/core/layout/layout.cpp
+++ b/weex_core/Source/core/layout/layout.cpp
@@ -190,13 +190,11 @@ namespace WeexCore {
         (widthMeasureMode == kUnspecified
             || heightMeasureMode == kUnspecified)) {
       float constrainsWidth = width;
-      if(isnan(width)){
-        if(!isnan(mCssStyle->mMaxWidth)){
+      if(isnan(width) && !isnan(mCssStyle->mMaxWidth)){
           constrainsWidth = mCssStyle->mMaxWidth;
-        }
       }
 
-      if((!isnan(width)&&widthMeasureMode == kExactly) ||
+      if((!isnan(width)) ||
           (isnan(width) && !isnan(mCssStyle->mMaxWidth))) {
         constrainsWidth -= sumPaddingBorderAlongAxis(this, true);
       }


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services