Fixed the ItemView already scrolled to end logic 66/114266/2
authorPaul Wisbey <p.wisbey@samsung.com>
Sun, 12 Feb 2017 19:50:34 +0000 (19:50 +0000)
committerPaul Wisbey <p.wisbey@samsung.com>
Mon, 13 Feb 2017 07:23:22 +0000 (07:23 +0000)
Change-Id: I7d4e9df6c4c801077a46e6957b6d159977646de2

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;
         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
         // 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 );
         }
       }
 
         }
       }