protected override bool UpdateItems(Bounds viewBounds, Bounds contentBounds)
{
bool changed = false;
if (viewBounds.min.y < contentBounds.min.y + 1)
{
float size = NewItemAtEnd();
if (size > 0)
{
if (threshold < size)
{
threshold = size * 1.1f;
}
changed = true;
}
}
else if (viewBounds.min.y > contentBounds.min.y + threshold)
{
float size = DeleteItemAtEnd();
if (size > 0)
{
changed = true;
}
}
if (viewBounds.max.y > contentBounds.max.y - 1)
{
float size = NewItemAtStart();
if (size > 0)
{
if (threshold < size)
{
threshold = size * 1.1f;
}
changed = true;
}
}
else if (viewBounds.max.y < contentBounds.max.y - threshold)
{
float size = DeleteItemAtStart();
if (size > 0)
{
changed = true;
}
}
return changed;
}