#include <dali/public-api/object/type-registry.h>
#include <dali/public-api/object/type-registry-helper.h>
#include <dali/devel-api/object/property-helper-devel.h>
+#include <dali/devel-api/object/handle-devel.h>
// INTERNAL INCLUDES
#include <dali-toolkit/public-api/controls/scroll-bar/scroll-bar.h>
float ItemView::GetCurrentLayoutPosition(unsigned int itemId) const
{
- return Self().GetProperty<float>( Toolkit::ItemView::Property::LAYOUT_POSITION ) + static_cast<float>( itemId );
+ return DevelHandle::GetCurrentProperty< float >( Self(), Toolkit::ItemView::Property::LAYOUT_POSITION ) + static_cast<float>( itemId );
}
void ItemView::ActivateLayout(unsigned int layoutIndex, const Vector3& targetSize, float durationSeconds)
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 );
}
}
float firstItemScrollPosition = ClampFirstItemPosition(layoutPositionDelta, layoutSize, *mActiveLayout);
- float currentOvershoot = self.GetProperty<float>(Toolkit::ItemView::Property::OVERSHOOT);
+ float currentOvershoot = DevelHandle::GetCurrentProperty< float >( self, Toolkit::ItemView::Property::OVERSHOOT );
self.SetProperty(Toolkit::ItemView::Property::LAYOUT_POSITION, firstItemScrollPosition );
if(mOvershootAnimationSpeed > Math::MACHINE_EPSILON_0)
{
- float currentOvershoot = self.GetProperty<float>(Toolkit::ItemView::Property::OVERSHOOT);
+ float currentOvershoot = DevelHandle::GetCurrentProperty< float >( self, Toolkit::ItemView::Property::OVERSHOOT );
float duration = 0.0f;
if (mOvershootOverlay)