+bool LayoutDataElement::AdjustMeasuredSize( float& width, float& height, Toolkit::LayoutTransitionData::Animator::Type animatorType )
+{
+ bool adjusted = true;
+ if( targetValue.GetType() == Property::NONE )
+ {
+ return false;
+ }
+
+ Actor actor = Actor::DownCast( handle );
+ float animateByMultiplier = ( animatorType == Toolkit::LayoutTransitionData::Animator::Type::ANIMATE_BY ) ? 1.0f : 0.0f;
+ Vector3 size = actor.GetCurrentSize();
+
+ switch ( targetValue.GetType() )
+ {
+ case Property::Type::VECTOR3:
+ {
+ Vector3 value = targetValue.Get<Vector3>();
+ switch( propertyIndex )
+ {
+ case Actor::Property::SCALE:
+ {
+ width = size.x * ( animateByMultiplier + value.x );
+ height = size.y * ( animateByMultiplier + value.y );
+ break;
+ }
+ case Actor::Property::SIZE:
+ {
+ width = value.x + ( animateByMultiplier * size.x );
+ height = value.y + ( animateByMultiplier * size.y );
+ break;
+ }
+ default:
+ {
+ adjusted = false;
+ break;
+ }
+ }
+ break;
+ }
+ case Property::Type::FLOAT:
+ {
+ float value = targetValue.Get<float>();
+ switch( propertyIndex )
+ {
+ case Actor::Property::SCALE_X:
+ {
+ width = size.x * ( animateByMultiplier + value );
+ break;
+ }
+ case Actor::Property::SCALE_Y:
+ {
+ height = size.y * ( animateByMultiplier + value );
+ break;
+ }
+ case Actor::Property::SIZE_WIDTH:
+ {
+ width = value + ( animateByMultiplier * size.x );
+ break;
+ }
+ case Actor::Property::SIZE_HEIGHT:
+ {
+ height = value + ( animateByMultiplier * size.y );
+ break;
+ }
+ default:
+ {
+ adjusted = true;
+ break;
+ }
+ }
+ break;
+ }
+ default:
+ {
+ adjusted = false;
+ break;
+ }
+ }
+
+ return adjusted;
+}
+
+void LayoutDataElement::UpdatePropertyIndex()
+{
+ if( propertyIndex == -1 && handle && !propertyName.empty() )
+ {
+ Actor actor = Actor::DownCast( handle );
+ propertyIndex = DevelHandle::GetPropertyIndex( actor, Property::Key( propertyName ) );
+ }
+}
+
+void LayoutDataElement::UpdateAnimatorIndex( const LayoutAnimatorArray& animators )
+{
+ if( animatorIndex == -1 )
+ {
+ if( animatorName.empty() )
+ {
+ animatorIndex = 0;
+ return;
+ }
+
+ std::string animatorName = this->animatorName;
+ auto animator = std::find_if( animators.begin(), animators.end(), [ &animatorName ](const LayoutDataAnimator& iter) {
+ return ( iter.name == animatorName ); } );
+ if( animator != animators.end() )
+ {
+ animatorIndex = std::distance( animators.begin(), animator );
+ }
+ }
+}
+
+void LayoutDataElement::UpdatePositionDataIndex( LayoutData& layoutData )
+{
+ positionDataIndex = layoutData.layoutPositionDataArray.size() - 1;
+ switch( propertyIndex )
+ {
+ case Actor::Property::SCALE:
+ case Actor::Property::SCALE_X:
+ case Actor::Property::SCALE_Y:
+ if( positionDataIndex != -1 && updateMeasuredSize )
+ {
+ layoutData.layoutPositionDataArray[ positionDataIndex ].updateWithCurrentSize = true;
+ }
+ break;
+ }
+}
+
+LayoutTransitionData::LayoutTransitionData() :
+ mUpdateMeasuredSize( false )