From 519e8598015b2c57a7ab004510bc1dd53cc48cd5 Mon Sep 17 00:00:00 2001
From: Paul Wisbey
Date: Sun, 12 Feb 2017 19:50:34 +0000
Subject: [PATCH] Fixed the ItemView already scrolled to end logic
Change-Id: I7d4e9df6c4c801077a46e6957b6d159977646de2
---
.../internal/controls/scrollable/item-view/item-view-impl.cpp | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
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 8b84088..6794590 100755
--- a/dali-toolkit/internal/controls/scrollable/item-view/item-view-impl.cpp
+++ b/dali-toolkit/internal/controls/scrollable/item-view/item-view-impl.cpp
@@ -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 );
}
}
--
2.7.4