From: Richard Huang Date: Tue, 20 Oct 2015 10:38:31 +0000 (+0100) Subject: Fixed issue that ItemView overshoot appears before it reaches the end of the list X-Git-Tag: dali_1.1.7~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F03%2F49803%2F1;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git Fixed issue that ItemView overshoot appears before it reaches the end of the list Change-Id: I8d8a6093e7494f091d7aa1254b0ff2d48d9f5ae2 --- 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 91a9f97..27054bd 100644 --- a/dali-toolkit/internal/controls/scrollable/item-view/item-view-impl.cpp +++ b/dali-toolkit/internal/controls/scrollable/item-view/item-view-impl.cpp @@ -1184,7 +1184,10 @@ void ItemView::OnPan( const PanGesture& gesture ) 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; }