if (scrollAnimationNeeded)
{
RemoveAnimation(mScrollAnimation);
- mScrollAnimation = Animation::New(mAnchoringDuration);
+ mScrollAnimation = Animation::New(durationSeconds);
mScrollAnimation.AnimateTo( Property( mScrollPositionObject, ScrollConnector::SCROLL_POSITION ), firstItemScrollPosition, AlphaFunctions::EaseOut );
mScrollAnimation.AnimateTo( Property(self, mPropertyPosition), GetScrollPosition(firstItemScrollPosition, targetSize), AlphaFunctions::EaseOut );
mScrollAnimation.Play();
if( removeIter != mItemPool.end() )
{
- Self().Remove( removeIter->second );
+ ReleaseActor(itemId, removeIter->second);
+
removed = true;
// Adjust the remaining item IDs, for example if item 2 is removed:
const ItemPoolIter iter = mItemPool.find( replacementItem.first );
if( mItemPool.end() != iter )
{
- Self().Remove( iter->second );
+ ReleaseActor(iter->first, iter->second);
iter->second = replacementItem.second;
}
else
if( ! range.Within( current ) )
{
- Self().Remove( iter->second );
+ ReleaseActor(iter->first, iter->second);
mItemPool.erase( iter++ ); // erase invalidates the return value of post-increment; iter remains valid
}
}
}
+void ItemView::ReleaseActor( ItemId item, Actor actor )
+{
+ Self().Remove( actor );
+ mItemFactory.ItemReleased(item, actor);
+}
+
ItemRange ItemView::GetItemRange(ItemLayout& layout, const Vector3& layoutSize, float layoutPosition, bool reserveExtra)
{
unsigned int itemCount = mItemFactory.GetNumberOfItems();