X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fcontrols%2Fscrollable%2Fitem-view%2Fitem-view-impl.cpp;h=5f1f7b85949671fdd23c5a83252a1e7647bcecbc;hp=5ab0e2f0e255ef770fc42a8eda3fe3d12b01cbe3;hb=7c48d81eb1f49aab3c852ab83c9f688cfdfadd0d;hpb=fd07098013f6492fa82305852fed028bbf963110 diff --git a/dali-toolkit/internal/controls/scrollable/item-view/item-view-impl.cpp b/dali-toolkit/internal/controls/scrollable/item-view/item-view-impl.cpp index 5ab0e2f..5f1f7b8 100644 --- a/dali-toolkit/internal/controls/scrollable/item-view/item-view-impl.cpp +++ b/dali-toolkit/internal/controls/scrollable/item-view/item-view-impl.cpp @@ -439,7 +439,6 @@ void ItemView::OnInitialize() mPropertyMinimumLayoutPosition = self.RegisterProperty(MINIMUM_LAYOUT_POSITION_PROPERTY_NAME, 0.0f); mPropertyPosition = self.RegisterProperty(POSITION_PROPERTY_NAME, 0.0f); mPropertyScrollSpeed = self.RegisterProperty(SCROLL_SPEED_PROPERTY_NAME, 0.0f); - mPropertyOvershoot = self.RegisterProperty(OVERSHOOT_PROPERTY_NAME, 0.0f); ApplyOvershootOverlayConstraints(); @@ -1645,7 +1644,7 @@ void ItemView::ApplyOvershootOverlayConstraints() { Constraint constraint = Constraint::New( Actor::SIZE_WIDTH, ParentSource( mPropertyScrollDirection ), - ParentSource( mPropertyOvershoot ), + Source( mScrollPositionObject, ScrollConnector::OVERSHOOT ), ParentSource( Actor::SIZE ), OvershootOverlaySizeConstraint() ); mOvershootOverlay.ApplyConstraint(constraint); @@ -1653,14 +1652,14 @@ void ItemView::ApplyOvershootOverlayConstraints() constraint = Constraint::New( Actor::ROTATION, ParentSource( mPropertyScrollDirection ), - ParentSource( mPropertyOvershoot ), + Source( mScrollPositionObject, ScrollConnector::OVERSHOOT ), OvershootOverlayRotationConstraint() ); mOvershootOverlay.ApplyConstraint(constraint); constraint = Constraint::New( Actor::POSITION, ParentSource( Actor::SIZE ), ParentSource( mPropertyScrollDirection ), - ParentSource( mPropertyOvershoot ), + Source( mScrollPositionObject, ScrollConnector::OVERSHOOT ), OvershootOverlayPositionConstraint() ); mOvershootOverlay.ApplyConstraint(constraint); @@ -1672,7 +1671,7 @@ void ItemView::ApplyOvershootOverlayConstraints() int effectOvershootPropertyIndex = mOvershootEffect.GetPropertyIndex(mOvershootEffect.GetOvershootPropertyName()); Actor self = Self(); constraint = Constraint::New( effectOvershootPropertyIndex, - Source( self, mPropertyOvershoot ), + Source( mScrollPositionObject, ScrollConnector::OVERSHOOT ), EqualToConstraint() ); mOvershootEffect.ApplyConstraint(constraint); } @@ -1711,13 +1710,13 @@ void ItemView::AnimateScrollOvershoot(float overshootAmount, bool animateBack) } Actor self = Self(); - float currentOvershoot = self.GetProperty(mPropertyOvershoot); + float currentOvershoot = mScrollPositionObject.GetProperty(ScrollConnector::OVERSHOOT); float duration = DEFAULT_OVERSHOOT_ANIMATION_DURATION * (animatingOn ? (1.0f - fabsf(currentOvershoot)) : fabsf(currentOvershoot)); RemoveAnimation(mScrollOvershootAnimation); mScrollOvershootAnimation = Animation::New(duration); mScrollOvershootAnimation.FinishedSignal().Connect(this, &ItemView::OnOvershootOnFinished); - mScrollOvershootAnimation.AnimateTo( Property(self, mPropertyOvershoot), overshootAmount, TimePeriod(0.0f, duration) ); + mScrollOvershootAnimation.AnimateTo( Property(mScrollPositionObject, ScrollConnector::OVERSHOOT), overshootAmount, TimePeriod(0.0f, duration) ); mScrollOvershootAnimation.Play(); mAnimatingOvershootOn = animatingOn;