Fix to use width and height correctly in flex-layout-impl.cpp 27/182827/1
authorSeoyeon Kim <seoyeon2.kim@samsung.com>
Thu, 28 Jun 2018 07:58:28 +0000 (16:58 +0900)
committerSeoyeon Kim <seoyeon2.kim@samsung.com>
Thu, 28 Jun 2018 07:59:09 +0000 (16:59 +0900)
Change-Id: I2535ead9236099f738bf07c420eb058396eace50
Signed-off-by: Seoyeon Kim <seoyeon2.kim@samsung.com>
dali-toolkit/internal/layouting/flex-layout-impl.cpp

index 8766c58..648a7f6 100644 (file)
@@ -227,12 +227,12 @@ void FlexLayout::OnMeasure( MeasureSpec widthMeasureSpec, MeasureSpec heightMeas
     YGNodeStyleSetMaxWidth( mRoot, width );
   }
 
-  if (heightMeasureSpec.GetMode() == MeasureSpec::Mode::EXACTLY)
+  if ( heightMeasureSpec.GetMode() == MeasureSpec::Mode::EXACTLY )
   {
     height = heightMeasureSpec.GetSize();
     YGNodeStyleSetHeight( mRoot, height );
   }
-  else if (widthMeasureSpec.GetMode() == MeasureSpec::Mode::AT_MOST)
+  else if ( heightMeasureSpec.GetMode() == MeasureSpec::Mode::AT_MOST )
   {
     height = heightMeasureSpec.GetSize();
     YGNodeStyleSetMaxHeight( mRoot, height );
@@ -306,7 +306,7 @@ YGSize FlexLayout::OnChildMeasure( YGNodeRef node,
 
   if( desiredHeight == Toolkit::ChildLayoutData::MATCH_PARENT )
   {
-    if( innerWidth != YGUndefined)
+    if( innerHeight != YGUndefined)
     {
       desiredHeight = innerHeight;
     }