+ if ( mDisconnectAction != action )
+ {
+ mDisconnectAction = action;
+
+ for ( AnimatorIter iter = mAnimators.Begin(), endIter = mAnimators.End(); iter != endIter; ++iter )
+ {
+ (*iter)->SetDisconnectAction( action );
+ }
+ }
+}
+
+void Animation::SetPlayRange( const Vector2& range )
+{
+ mPlayRange = range;
+
+ // Make sure mElapsedSeconds is within the new range
+
+ if( mState == Stopped )
+ {
+ // Ensure that the animation starts at the right place
+ mElapsedSeconds = mPlayRange.x * mDurationSeconds;
+ }
+ else
+ {
+ // If already past the end of the range, but before end of duration, then clamp will
+ // ensure that the animation stops on the next update.
+ // If not yet at the start of the range, clamping will jump to the start
+ mElapsedSeconds = Dali::Clamp(mElapsedSeconds, mPlayRange.x*mDurationSeconds , mPlayRange.y*mDurationSeconds );
+ }