Example #1
0
        private void UpdateItemPos(int dataIndex)
        {
            var item = _items[_mapper.GetViewIndex(dataIndex)];
            var newY = dataIndex * NormalItemSize + (SelectedItemSize - NormalItemSize) * GetSelectedItemsCountBefore(dataIndex) + PaddingTop;

            var anchoredPosition = item.anchoredPosition;

            anchoredPosition.y    = -newY;
            item.anchoredPosition = anchoredPosition;
        }
Example #2
0
 protected override TMediator GetMediatorAt(int index)
 {
     return(_mapper.IsItemVisible(index) ? ItemMediators[_mapper.GetViewIndex(index)] : null);
 }