Fix position error when INHERIT_POSITION is false 40/135940/2
authorHeeyong Song <heeyong.song@samsung.com>
Tue, 27 Jun 2017 11:18:06 +0000 (20:18 +0900)
committerHeeyong Song <heeyong.song@samsung.com>
Fri, 30 Jun 2017 04:09:26 +0000 (13:09 +0900)
- Consider the anchor point

Change-Id: I5f646a469969338e5fd7b8a420a703a7138a715e

dali/internal/update/manager/transform-manager.cpp

index 0d55efe..05ad05b 100644 (file)
@@ -289,9 +289,10 @@ void TransformManager::Update()
         if( (mInheritanceMode[i] & INHERIT_POSITION) == 0 )
         {
           //Don't inherit position
+          CalculateCenterPosition( centerPosition, mTxComponentStatic[ i ], mTxComponentAnimatable[ i ], mSize[ i ], half, topLeft );
           mLocal[i].SetTransformComponents( localScale, localOrientation, Vector3::ZERO );
           Matrix::Multiply( mWorld[i], mLocal[i], parentMatrix );
-          mWorld[i].SetTranslation( mTxComponentAnimatable[i].mPosition);
+          mWorld[i].SetTranslation( mTxComponentAnimatable[i].mPosition + centerPosition );
         }
         else
         {