Fixed issue that ItemView overshoot appears before it reaches the end of the list 03/49803/1
authorRichard Huang <r.huang@samsung.com>
Tue, 20 Oct 2015 10:38:31 +0000 (11:38 +0100)
committerRichard Huang <r.huang@samsung.com>
Tue, 20 Oct 2015 10:38:31 +0000 (11:38 +0100)
Change-Id: I8d8a6093e7494f091d7aa1254b0ff2d48d9f5ae2

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

index 91a9f97..27054bd 100644 (file)
@@ -1184,7 +1184,10 @@ void ItemView::OnPan( const PanGesture& gesture )
 
       self.SetProperty(Toolkit::ItemView::Property::LAYOUT_POSITION, firstItemScrollPosition );
 
 
       self.SetProperty(Toolkit::ItemView::Property::LAYOUT_POSITION, firstItemScrollPosition );
 
-      if( (firstItemScrollPosition >= 0.0f && currentOvershoot < 1.0f) || (firstItemScrollPosition >= mActiveLayout->GetMinimumLayoutPosition(mItemFactory.GetNumberOfItems(), layoutSize) && currentOvershoot > -1.0f) )
+      if( ( firstItemScrollPosition >= 0.0f &&
+            currentOvershoot < 1.0f ) ||
+          ( firstItemScrollPosition <= mActiveLayout->GetMinimumLayoutPosition(mItemFactory.GetNumberOfItems(), layoutSize) &&
+            currentOvershoot > -1.0f ) )
       {
         mTotalPanDisplacement += gesture.displacement;
       }
       {
         mTotalPanDisplacement += gesture.displacement;
       }