Stage stage = Stage::GetCurrent();
auto absoluteLayout = Control::New();
auto layout = AbsoluteLayout::New();
+ layout.SetAnimateLayout( true );
DevelControl::SetLayout( absoluteLayout, layout );
absoluteLayout.SetName( "AsoluteLayout");
DALI_TEST_EQUALS( controls[3].GetProperty<Vector3>( Actor::Property::SIZE ), Vector3( 100.0f, 100.0f, 0.0f ), 0.0001f, TEST_LOCATION );
END_TEST;
-}
\ No newline at end of file
+}
if( mImpl->mAnimated )
{
auto animation = Animation::New( 0.5f );
- animation.AnimateTo( Property( actor, Actor::Property::POSITION ),
- Vector3( float(left.mValue), float(top.mValue), 0.0f ) );
- animation.AnimateTo( Property( actor, Actor::Property::SIZE ),
- Vector3( right-left, bottom-top, 0.0f ) );
+ animation.AnimateTo( Property( actor, Actor::Property::POSITION_X ), float( left.mValue ) );
+ animation.AnimateTo( Property( actor, Actor::Property::POSITION_Y ), float( top.mValue ) );
+
+ animation.AnimateTo( Property( actor, Actor::Property::SIZE_WIDTH ), float( newWidth ) );
+ animation.AnimateTo( Property( actor, Actor::Property::SIZE_HEIGHT ), float( newHeight ) );
+
animation.FinishedSignal().Connect( mSlotDelegate, &LayoutItem::OnLayoutAnimationFinished );
animation.Play();
}
else
{
// @todo Collate into list of Property & Property::Value pairs.
- actor.SetPosition( Vector3( float(left.mValue), float(top.mValue), 0.0f ) );
- actor.SetSize( Vector3( right-left, bottom-top, 0.0f ) );
+ actor.SetX( float( left.mValue ) );
+ actor.SetY( float( top.mValue ) );
+ actor.SetProperty( Actor::Property::SIZE_WIDTH, float( newWidth ) );
+ actor.SetProperty( Actor::Property::SIZE_HEIGHT, float( newHeight ) );
}
}