Merge "Fixed the ItemView already scrolled to end logic" into devel/master
authorAdeel Kazmi <adeel.kazmi@samsung.com>
Thu, 23 Feb 2017 18:36:48 +0000 (10:36 -0800)
committerGerrit Code Review <gerrit@review.vlan103.tizen.org>
Thu, 23 Feb 2017 18:36:49 +0000 (10:36 -0800)
dali-toolkit/internal/controls/scrollable/item-view/item-view-impl.cpp

index 8b84088..6794590 100755 (executable)
@@ -1189,10 +1189,12 @@ void ItemView::OnPan( const PanGesture& gesture )
         mScrollAnimation.AnimateTo( Property(self, Toolkit::ItemView::Property::SCROLL_SPEED), 0.0f, AlphaFunction::EASE_OUT );
 
         mIsFlicking = true;
+
         // Check whether it has already scrolled to the end
-        if(fabs(currentLayoutPosition - firstItemScrollPosition) > Math::MACHINE_EPSILON_0)
+        if( fabs(currentLayoutPosition - firstItemScrollPosition) < Math::MACHINE_EPSILON_0 )
         {
-          AnimateScrollOvershoot(0.0f);
+          AnimateScrollOvershoot( 0.0f );
+          RemoveAnimation( mScrollAnimation );
         }
       }