Fix anchor animation in ItemView and disable anchoring by default 96/39396/2
authorRichard Huang <r.huang@samsung.com>
Thu, 14 May 2015 10:23:34 +0000 (11:23 +0100)
committerAdeel Kazmi <adeel.kazmi@samsung.com>
Thu, 14 May 2015 12:17:19 +0000 (05:17 -0700)
Change-Id: I948bd793a754b88e72545a8a7821bd5ddcced839

dali-toolkit/internal/controls/scrollable/item-view/item-view-impl.cpp

index 4e23aa9..9ef9b3a 100644 (file)
@@ -281,7 +281,7 @@ ItemView::ItemView(ItemFactory& factory)
   mActiveLayout(NULL),
   mAnimatingOvershootOn(false),
   mAnimateOvershootOff(false),
-  mAnchoringEnabled(true),
+  mAnchoringEnabled(false),
   mAnchoringDuration(DEFAULT_ANCHORING_DURATION),
   mRefreshIntervalLayoutPositions(0.0f),
   mRefreshOrderHint(true/*Refresh item 0 first*/),
@@ -1260,7 +1260,7 @@ Animation ItemView::DoAnchoring()
     float anchorPosition = mActiveLayout->GetClosestAnchorPosition( GetCurrentLayoutPosition(0) );
 
     anchoringAnimation = Animation::New(mAnchoringDuration);
-    anchoringAnimation.AnimateTo( Property(self, Toolkit::ItemView::Property::LAYOUT_POSITION), -anchorPosition, AlphaFunction::EASE_OUT );
+    anchoringAnimation.AnimateTo( Property(self, Toolkit::ItemView::Property::LAYOUT_POSITION), anchorPosition, AlphaFunction::EASE_OUT );
     anchoringAnimation.AnimateTo( Property(self, Toolkit::ItemView::Property::SCROLL_SPEED), 0.0f, AlphaFunction::EASE_OUT );
     if(!mIsFlicking)
     {