2 * Copyright (c) 2018 Samsung Electronics Co., Ltd.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 #include <dali/integration-api/debug.h>
19 #include <dali/public-api/animation/animation.h>
20 #include <dali/public-api/object/base-handle.h>
21 #include <dali/public-api/object/type-registry-helper.h>
22 #include <dali-toolkit/public-api/controls/control.h>
23 #include <dali/devel-api/object/handle-devel.h>
24 #include <dali-toolkit/devel-api/layouting/layout-item-impl.h>
25 #include <dali-toolkit/devel-api/layouting/layout-group-impl.h>
26 #include <dali-toolkit/internal/layouting/layout-transition-data-impl.h>
27 #include <dali-toolkit/internal/layouting/layout-item-data-impl.h>
29 #include <dali/devel-api/scripting/enum-helper.h>
33 #if defined(DEBUG_ENABLED)
34 Debug::Filter* gLayoutFilter = Debug::Filter::New( Debug::NoLogging, false, "LOG_LAYOUT" );
38 const char* TOKEN_CONDITION("condition");
39 const char* TOKEN_AFFECTS_SIBLINGS("affectsSiblings");
40 const char* TOKEN_PROPERTY("property");
41 const char* TOKEN_INITIAL_VALUE("initialValue");
42 const char* TOKEN_TARGET_VALUE("targetValue");
43 const char* TOKEN_ANIMATOR("animator");
44 const char* TOKEN_TYPE("type");
45 const char* TOKEN_NAME("name");
46 const char* TOKEN_TIME_PERIOD("timePeriod");
47 const char* TOKEN_DURATION("duration");
48 const char* TOKEN_DELAY("delay");
49 const char* TOKEN_ALPHA_FUNCTION("alphaFunction");
51 DALI_ENUM_TO_STRING_TABLE_BEGIN( ANIMATOR_TYPE )
52 DALI_ENUM_TO_STRING_WITH_SCOPE( Dali::Toolkit::LayoutTransitionData::Animator::Type, ANIMATE_TO )
53 DALI_ENUM_TO_STRING_WITH_SCOPE( Dali::Toolkit::LayoutTransitionData::Animator::Type, ANIMATE_BY )
54 DALI_ENUM_TO_STRING_WITH_SCOPE( Dali::Toolkit::LayoutTransitionData::Animator::Type, ANIMATE_BETWEEN )
55 DALI_ENUM_TO_STRING_WITH_SCOPE( Dali::Toolkit::LayoutTransitionData::Animator::Type, ANIMATE_PATH )
56 DALI_ENUM_TO_STRING_TABLE_END( ANIMATOR_TYPE )
58 DALI_ENUM_TO_STRING_TABLE_BEGIN( ALPHA_FUNCTION_BUILTIN )
59 DALI_ENUM_TO_STRING_WITH_SCOPE(Dali::AlphaFunction, LINEAR)
60 DALI_ENUM_TO_STRING_WITH_SCOPE(Dali::AlphaFunction, REVERSE)
61 DALI_ENUM_TO_STRING_WITH_SCOPE(Dali::AlphaFunction, EASE_IN)
62 DALI_ENUM_TO_STRING_WITH_SCOPE(Dali::AlphaFunction, EASE_OUT)
63 DALI_ENUM_TO_STRING_WITH_SCOPE(Dali::AlphaFunction, EASE_IN_OUT)
64 DALI_ENUM_TO_STRING_WITH_SCOPE(Dali::AlphaFunction, EASE_IN_SQUARE)
65 DALI_ENUM_TO_STRING_WITH_SCOPE(Dali::AlphaFunction, EASE_OUT_SQUARE)
66 DALI_ENUM_TO_STRING_WITH_SCOPE(Dali::AlphaFunction, EASE_IN_SINE)
67 DALI_ENUM_TO_STRING_WITH_SCOPE(Dali::AlphaFunction, EASE_OUT_SINE)
68 DALI_ENUM_TO_STRING_WITH_SCOPE(Dali::AlphaFunction, EASE_IN_OUT_SINE)
69 DALI_ENUM_TO_STRING_WITH_SCOPE(Dali::AlphaFunction, EASE_OUT_BACK)
70 DALI_ENUM_TO_STRING_WITH_SCOPE(Dali::AlphaFunction, BOUNCE)
71 DALI_ENUM_TO_STRING_WITH_SCOPE(Dali::AlphaFunction, SIN)
72 DALI_ENUM_TO_STRING_TABLE_END( ALPHA_FUNCTION_BUILTIN )
83 bool LayoutDataElement::AdjustMeasuredSize( float& width, float& height, Toolkit::LayoutTransitionData::Animator::Type animatorType )
86 if( targetValue.GetType() == Property::NONE )
91 Actor actor = handle.GetHandle();
92 float animateByMultiplier = ( animatorType == Toolkit::LayoutTransitionData::Animator::Type::ANIMATE_BY ) ? 1.0f : 0.0f;
93 Vector3 size = actor.GetCurrentSize();
95 switch ( targetValue.GetType() )
97 case Property::Type::VECTOR3:
99 Vector3 value = targetValue.Get<Vector3>();
100 switch( propertyIndex )
102 case Actor::Property::SCALE:
104 width = size.x * ( animateByMultiplier + value.x );
105 height = size.y * ( animateByMultiplier + value.y );
108 case Actor::Property::SIZE:
110 width = value.x + ( animateByMultiplier * size.x );
111 height = value.y + ( animateByMultiplier * size.y );
122 case Property::Type::FLOAT:
124 float value = targetValue.Get<float>();
125 switch( propertyIndex )
127 case Actor::Property::SCALE_X:
129 width = size.x * ( animateByMultiplier + value );
132 case Actor::Property::SCALE_Y:
134 height = size.y * ( animateByMultiplier + value );
137 case Actor::Property::SIZE_WIDTH:
139 width = value + ( animateByMultiplier * size.x );
142 case Actor::Property::SIZE_HEIGHT:
144 height = value + ( animateByMultiplier * size.y );
165 void LayoutDataElement::UpdatePropertyIndex()
167 if( propertyIndex == -1 && !propertyName.empty() )
169 Actor actor = handle.GetHandle();
172 propertyIndex = DevelHandle::GetPropertyIndex( actor, Property::Key( propertyName ) );
177 void LayoutDataElement::UpdateAnimatorIndex( const LayoutAnimatorArray& animators )
179 if( animatorIndex == -1 )
181 if( animatorName.empty() )
187 std::string animatorName = this->animatorName;
188 auto animator = std::find_if( animators.begin(), animators.end(), [ &animatorName ](const LayoutDataAnimator& iter) {
189 return ( iter.name == animatorName ); } );
190 if( animator != animators.end() )
192 animatorIndex = std::distance( animators.begin(), animator );
197 void LayoutDataElement::UpdatePositionDataIndex( LayoutData& layoutData )
199 positionDataIndex = layoutData.layoutPositionDataArray.size() - 1;
200 switch( propertyIndex )
202 case Actor::Property::SCALE:
203 case Actor::Property::SCALE_X:
204 case Actor::Property::SCALE_Y:
205 if( positionDataIndex != -1 && updateMeasuredSize )
207 layoutData.layoutPositionDataArray[ positionDataIndex ].updateWithCurrentSize = true;
213 LayoutTransitionData::LayoutTransitionData() :
214 mUpdateMeasuredSize( false )
218 LayoutTransitionData::~LayoutTransitionData()
222 LayoutTransitionDataPtr LayoutTransitionData::New()
224 LayoutTransitionDataPtr layoutAnimationData( new LayoutTransitionData() );
225 return layoutAnimationData;
228 LayoutTransitionData::PropertyAnimator::PropertyAnimator( )
231 , interpolation( Animation::Linear )
235 LayoutTransitionData::PropertyAnimator::PropertyAnimator( Actor actor, Property::Map map )
238 , interpolation( Animation::Linear )
242 LayoutTransitionData::PropertyAnimator::PropertyAnimator( Actor actor, Property::Map map, Path path, Vector3 forward )
245 , interpolation( Animation::Linear )
251 LayoutTransitionData::PropertyAnimator::PropertyAnimator( Actor actor, Property::Map map, KeyFrames keyFrames, Animation::Interpolation interpolation )
254 , keyFrames( keyFrames )
255 , interpolation( interpolation )
259 void LayoutTransitionData::AddPropertyAnimator( Actor actor, Property::Map map )
261 LayoutDataElement layoutDataElement;
262 if( ConvertToLayoutDataElement( PropertyAnimator( actor, map ), layoutDataElement ) )
264 mLayoutDataElements.push_back( layoutDataElement );
267 UpdateAnimatorsIndices();
270 void LayoutTransitionData::AddPropertyAnimator( Actor actor, Property::Map map, KeyFrames keyFrames, Animation::Interpolation interpolation )
272 LayoutDataElement layoutDataElement;
273 if( ConvertToLayoutDataElement( PropertyAnimator( actor, map, keyFrames, interpolation ), layoutDataElement ) )
275 mLayoutDataElements.push_back( layoutDataElement );
278 UpdateAnimatorsIndices();
281 void LayoutTransitionData::AddPropertyAnimator( Actor actor, Property::Map map, Path path, Vector3 forward )
283 LayoutDataElement layoutDataElement;
284 if( ConvertToLayoutDataElement( PropertyAnimator( actor, map, path, forward ), layoutDataElement ) )
286 mLayoutDataElements.push_back( layoutDataElement );
289 UpdateAnimatorsIndices();
292 bool LayoutTransitionData::ConvertToLayoutAnimator( const Property::Map& animatorMap, const PropertyAnimator& propertyAnimator, LayoutDataAnimator& layoutDataAnimator )
296 for ( size_t animatorMapIdx = 0; animatorMapIdx < animatorMap.Count(); ++animatorMapIdx )
298 const KeyValuePair pair( animatorMap.GetKeyValue( animatorMapIdx ) );
300 Property::Index indexKey = Property::INVALID_INDEX;
301 if ( pair.first.type == Property::Key::STRING )
303 const std::string& key(pair.first.stringKey);
304 if( key == TOKEN_TYPE )
306 indexKey = Dali::Toolkit::LayoutTransitionData::AnimatorKey::TYPE;
308 else if( key == TOKEN_NAME )
310 indexKey = Dali::Toolkit::LayoutTransitionData::AnimatorKey::NAME;
312 else if( key == TOKEN_TIME_PERIOD )
314 indexKey = Dali::Toolkit::LayoutTransitionData::AnimatorKey::TIME_PERIOD;
316 else if( key == TOKEN_ALPHA_FUNCTION )
318 indexKey = Dali::Toolkit::LayoutTransitionData::AnimatorKey::ALPHA_FUNCTION;
323 indexKey = pair.first.indexKey;
326 const Property::Value& value( pair.second );
328 if ( indexKey == Dali::Toolkit::LayoutTransitionData::AnimatorKey::ALPHA_FUNCTION )
330 if ( value.GetType() == Property::ARRAY )
333 Vector4 controlPoints;
334 Property::Array *array = value.GetArray();
335 if ( array && array->Count() >= 4 )
337 for ( size_t vecIdx = 0; vecIdx < 4; ++vecIdx )
339 Property::Value& v = array->GetElementAt( vecIdx );
340 if ( v.GetType() == Property::FLOAT )
342 controlPoints[vecIdx] = v.Get<float>();
358 Vector2 controlPoint1( controlPoints.x, controlPoints.y );
359 Vector2 controlPoint2( controlPoints.z, controlPoints.w );
360 layoutDataAnimator.alphaFunction = AlphaFunction( controlPoint1, controlPoint2 );
367 else if ( value.GetType() == Property::VECTOR4 )
369 Vector4 controlPoints = value.Get<Vector4>();
370 Vector2 controlPoint1( controlPoints.x, controlPoints.y );
371 Vector2 controlPoint2( controlPoints.z, controlPoints.w );
372 layoutDataAnimator.alphaFunction = AlphaFunction( controlPoint1, controlPoint2 );
374 else if ( value.GetType() == Property::INTEGER )
376 layoutDataAnimator.alphaFunction = AlphaFunction( static_cast<AlphaFunction::BuiltinFunction>( value.Get<int>() ) );
378 else if ( value.GetType() == Property::STRING )
380 std::string alphaFunctionValue = value.Get<std::string>();
382 if ( alphaFunctionValue == "LINEAR" )
384 layoutDataAnimator.alphaFunction = AlphaFunction( AlphaFunction::LINEAR );
386 else if ( !alphaFunctionValue.compare( 0, 5, "EASE_" ) )
388 if ( alphaFunctionValue == "EASE_IN" )
390 layoutDataAnimator.alphaFunction = AlphaFunction( AlphaFunction::EASE_IN );
392 else if ( alphaFunctionValue == "EASE_OUT" )
394 layoutDataAnimator.alphaFunction = AlphaFunction( AlphaFunction::EASE_OUT );
396 else if ( !alphaFunctionValue.compare( 5, 3, "IN_" ) )
398 if ( !alphaFunctionValue.compare( 8, -1, "SQUARE" ) )
400 layoutDataAnimator.alphaFunction = AlphaFunction( AlphaFunction::EASE_IN_SQUARE );
402 else if ( !alphaFunctionValue.compare( 8, -1, "OUT" ) )
404 layoutDataAnimator.alphaFunction = AlphaFunction( AlphaFunction::EASE_IN_OUT );
406 else if ( !alphaFunctionValue.compare( 8, -1, "OUT_SINE" ) )
408 layoutDataAnimator.alphaFunction = AlphaFunction( AlphaFunction::EASE_IN_OUT_SINE );
410 else if ( !alphaFunctionValue.compare( 8, -1, "SINE" ) )
412 layoutDataAnimator.alphaFunction = AlphaFunction( AlphaFunction::EASE_IN_SINE );
415 else if ( !alphaFunctionValue.compare( 5, 4, "OUT_" ) )
417 if ( !alphaFunctionValue.compare( 9, -1, "SQUARE" ) )
419 layoutDataAnimator.alphaFunction = AlphaFunction( AlphaFunction::EASE_OUT_SQUARE );
421 else if ( !alphaFunctionValue.compare( 9, -1, "SINE" ) )
423 layoutDataAnimator.alphaFunction = AlphaFunction( AlphaFunction::EASE_OUT_SINE );
425 else if ( !alphaFunctionValue.compare( 9, -1, "BACK" ) )
427 layoutDataAnimator.alphaFunction = AlphaFunction( AlphaFunction::EASE_OUT_BACK );
431 else if ( alphaFunctionValue == "REVERSE" )
433 layoutDataAnimator.alphaFunction = AlphaFunction( AlphaFunction::REVERSE );
435 else if ( alphaFunctionValue == "BOUNCE" )
437 layoutDataAnimator.alphaFunction = AlphaFunction( AlphaFunction::BOUNCE );
439 else if ( alphaFunctionValue == "SIN" )
441 layoutDataAnimator.alphaFunction = AlphaFunction( AlphaFunction::SIN );
453 else if ( indexKey == Dali::Toolkit::LayoutTransitionData::AnimatorKey::NAME )
455 if( value.GetType() == Property::STRING )
457 layoutDataAnimator.name = value.Get<std::string>();
460 else if ( indexKey == Dali::Toolkit::LayoutTransitionData::AnimatorKey::TYPE )
462 if( value.GetType() == Property::STRING )
464 std::string animatorType = value.Get<std::string>();
465 if( animatorType == ANIMATOR_TYPE_TABLE[ Toolkit::LayoutTransitionData::Animator::Type::ANIMATE_TO ].string )
467 layoutDataAnimator.animatorType = Toolkit::LayoutTransitionData::Animator::Type::ANIMATE_TO;
469 else if( animatorType == ANIMATOR_TYPE_TABLE[ Toolkit::LayoutTransitionData::Animator::Type::ANIMATE_BY ].string )
471 layoutDataAnimator.animatorType = Toolkit::LayoutTransitionData::Animator::Type::ANIMATE_BY;
473 else if( animatorType == ANIMATOR_TYPE_TABLE[ Toolkit::LayoutTransitionData::Animator::Type::ANIMATE_BETWEEN ].string )
475 layoutDataAnimator.animatorType = Toolkit::LayoutTransitionData::Animator::Type::ANIMATE_BETWEEN;
476 layoutDataAnimator.keyFrames = propertyAnimator.keyFrames;
478 else if( animatorType == ANIMATOR_TYPE_TABLE[ Toolkit::LayoutTransitionData::Animator::Type::ANIMATE_PATH ].string )
480 layoutDataAnimator.animatorType = Toolkit::LayoutTransitionData::Animator::Type::ANIMATE_PATH;
481 layoutDataAnimator.path = propertyAnimator.path;
482 layoutDataAnimator.forward = propertyAnimator.forward;
485 else if ( value.GetType() == Property::INTEGER )
487 layoutDataAnimator.animatorType = static_cast<Toolkit::LayoutTransitionData::Animator::Type>( pair.second.Get<int>() );
490 else if ( indexKey == Dali::Toolkit::LayoutTransitionData::AnimatorKey::TIME_PERIOD )
492 Property::Map timeMap = value.Get<Property::Map>();
493 for ( size_t timeMapIdx = 0; timeMapIdx < timeMap.Count(); ++timeMapIdx )
495 const KeyValuePair pair( timeMap.GetKeyValue( timeMapIdx ) );
496 indexKey = Property::INVALID_INDEX;
498 if ( pair.first.type == Property::Key::STRING)
500 const std::string& key( pair.first.stringKey );
501 if( key == TOKEN_DURATION )
503 indexKey = Dali::Toolkit::LayoutTransitionData::AnimatorKey::DURATION;
505 else if( key == TOKEN_DELAY )
507 indexKey = Dali::Toolkit::LayoutTransitionData::AnimatorKey::DELAY;
512 indexKey = pair.first.indexKey;
515 if ( indexKey == Dali::Toolkit::LayoutTransitionData::AnimatorKey::DELAY )
517 layoutDataAnimator.timePeriod.delaySeconds = pair.second.Get<float>();
519 else if ( indexKey == Dali::Toolkit::LayoutTransitionData::AnimatorKey::DURATION )
521 layoutDataAnimator.timePeriod.durationSeconds = pair.second.Get<float>();
530 bool LayoutTransitionData::ConvertToLayoutDataElement(
531 const PropertyAnimator& propertyAnimator, LayoutDataElement& layoutDataElement )
533 const Property::Map& map = propertyAnimator.map;
534 bool propertyFound = false;
536 if( mLayoutAnimators.size() == 0 )
538 mLayoutAnimators.push_back( LayoutDataAnimator() );
541 layoutDataElement.handle = propertyAnimator.handle;
543 for( unsigned int mapIdx = 0; mapIdx < map.Count(); ++mapIdx )
545 const KeyValuePair pair( map.GetKeyValue( mapIdx ) );
546 const Property::Value& value( pair.second );
547 Property::Index indexKey = Property::INVALID_INDEX;
549 if ( pair.first.type == Property::Key::STRING )
551 const std::string& key( pair.first.stringKey );
552 if ( key == TOKEN_CONDITION )
554 indexKey = Dali::Toolkit::LayoutTransitionData::AnimatorKey::CONDITION;
556 if ( key == TOKEN_PROPERTY )
558 indexKey = Dali::Toolkit::LayoutTransitionData::AnimatorKey::PROPERTY;
560 else if( key == TOKEN_INITIAL_VALUE )
562 indexKey = Dali::Toolkit::LayoutTransitionData::AnimatorKey::INITIAL_VALUE;
564 else if( key == TOKEN_TARGET_VALUE )
566 indexKey = Dali::Toolkit::LayoutTransitionData::AnimatorKey::TARGET_VALUE;
568 else if( key == TOKEN_ANIMATOR )
570 indexKey = Dali::Toolkit::LayoutTransitionData::AnimatorKey::ANIMATOR;
572 else if( key == TOKEN_AFFECTS_SIBLINGS )
574 indexKey = Dali::Toolkit::LayoutTransitionData::AnimatorKey::AFFECTS_SIBLINGS;
579 indexKey = pair.first.indexKey;
582 if( indexKey == Dali::Toolkit::LayoutTransitionData::AnimatorKey::CONDITION )
584 layoutDataElement.condition = value.Get<int>();
586 else if ( indexKey == Dali::Toolkit::LayoutTransitionData::AnimatorKey::AFFECTS_SIBLINGS )
588 layoutDataElement.updateMeasuredSize = value.Get<bool>();
589 if( layoutDataElement.updateMeasuredSize )
591 mUpdateMeasuredSize = true;
594 else if( indexKey == Dali::Toolkit::LayoutTransitionData::AnimatorKey::PROPERTY )
596 if( value.GetType() == Property::STRING )
598 layoutDataElement.propertyName = value.Get<std::string>();
599 layoutDataElement.UpdatePropertyIndex();
603 layoutDataElement.propertyIndex = value.Get<int>();
605 propertyFound = true;
607 else if( indexKey == Dali::Toolkit::LayoutTransitionData::AnimatorKey::INITIAL_VALUE )
609 layoutDataElement.initialValue = value;
611 else if( indexKey == Dali::Toolkit::LayoutTransitionData::AnimatorKey::TARGET_VALUE )
613 layoutDataElement.targetValue = value;
615 else if( indexKey == Dali::Toolkit::LayoutTransitionData::AnimatorKey::ANIMATOR )
617 if( value.GetType() == Property::STRING )
619 layoutDataElement.animatorName = value.Get<std::string>();
620 layoutDataElement.UpdateAnimatorIndex( mLayoutAnimators );
622 else if ( value.GetType() == Property::MAP )
624 Property::Map animatorMap = value.Get< Property::Map >();
625 LayoutDataAnimator layoutDataAnimator;
626 if( ConvertToLayoutAnimator( animatorMap, propertyAnimator, layoutDataAnimator ) )
628 mLayoutAnimators.push_back( layoutDataAnimator );
629 layoutDataElement.animatorIndex = mLayoutAnimators.size() - 1;
635 return propertyFound;
638 void LayoutTransitionData::CollectChildrenLayoutDataElements( Actor child, LayoutData& layoutData )
640 LayoutDataArray& layoutDataArray = layoutData.layoutDataArray;
641 // Add the children animators
642 for( const LayoutDataElement& iter : layoutData.childrenLayoutDataArray )
644 Actor actor = iter.handle.GetHandle();
645 if( actor && actor != child )
650 LayoutDataElement layoutDataElement = iter;
651 Actor gainedChild = layoutData.layoutTransition.gainedChild.GetHandle();
652 Actor lostChild = layoutData.layoutTransition.lostChild.GetHandle();
653 switch ( layoutDataElement.condition )
655 case Dali::Toolkit::LayoutTransitionData::Condition::ON_ADD:
656 if ( layoutData.layoutTransition.layoutTransitionType != Dali::Toolkit::LayoutTransitionData::ON_CHILD_ADD
657 || gainedChild != child )
662 case Dali::Toolkit::LayoutTransitionData::Condition::ON_REMOVE:
663 if( layoutData.layoutTransition.layoutTransitionType != Dali::Toolkit::LayoutTransitionData::ON_CHILD_REMOVE
664 || lostChild != child )
669 case Dali::Toolkit::LayoutTransitionData::Condition::ON_FOCUS_GAINED:
670 if( layoutData.layoutTransition.layoutTransitionType != Dali::Toolkit::LayoutTransitionData::ON_CHILD_FOCUS
671 || gainedChild != child )
676 case Dali::Toolkit::LayoutTransitionData::Condition::ON_FOCUS_LOST:
677 if( layoutData.layoutTransition.layoutTransitionType != Dali::Toolkit::LayoutTransitionData::ON_CHILD_FOCUS
678 || lostChild != child )
687 if( layoutData.updateMeasuredSize && !layoutDataElement.updateMeasuredSize )
692 layoutDataElement.handle = child;
693 layoutDataElement.UpdatePropertyIndex();
694 layoutDataElement.UpdatePositionDataIndex( layoutData );
695 layoutDataArray.push_back( layoutDataElement );
699 void LayoutTransitionData::UpdateAnimatorsIndices()
701 for( LayoutDataElement& iter: mLayoutDataElements )
703 iter.UpdateAnimatorIndex( mLayoutAnimators );
707 void LayoutTransitionData::CollectLayoutDataElements( Actor owner, LayoutData& layoutData )
709 LayoutAnimatorArray& layoutAnimatorArray = layoutData.layoutAnimatorArray;
710 LayoutAnimatorArray::iterator it = mLayoutAnimators.begin();
711 if (layoutAnimatorArray.size() != 0)
713 // skip default animator
716 std::copy( it, mLayoutAnimators.end(), std::back_inserter( layoutAnimatorArray ) );
718 LayoutDataArray& layoutDataArray = layoutData.layoutDataArray;
719 // Collect the transition animators
720 for( const LayoutDataElement& iter : mLayoutDataElements )
722 Actor actor = iter.handle.GetHandle();
723 if( !actor || actor != owner )
725 layoutData.childrenLayoutDataArray.push_back( iter );
729 LayoutDataElement layoutDataElement = iter;
730 if( layoutData.updateMeasuredSize && !layoutDataElement.updateMeasuredSize )
735 layoutDataElement.UpdatePropertyIndex();
736 layoutDataElement.UpdatePositionDataIndex( layoutData );
737 layoutDataArray.push_back( layoutDataElement );
741 Dali::Toolkit::LayoutTransitionData::LayoutTransitionSignalType& LayoutTransitionData::FinishedSignal()
743 return mFinishedSignal;
746 void LayoutTransitionData::EmitSignalFinish( int layoutTransitionType )
748 if ( !mFinishedSignal.Empty() )
750 Dali::Toolkit::LayoutTransitionData handle( this );
751 mFinishedSignal.Emit( static_cast<Dali::Toolkit::LayoutTransitionData::Type>(layoutTransitionType), handle );
755 bool LayoutTransitionData::HasUpdateMeasuredSize()
757 return mUpdateMeasuredSize;
760 } // namespace Internal
761 } // namespace Toolkit