Adopts fix from #148 Scroll To improved Large list support

Resolves #148
pull/413/head
Simon Jackson 2017-07-02 14:44:23 +01:00
parent 50c41198db
commit 5cebd6cdfe
1 changed files with 2 additions and 2 deletions

View File

@ -203,9 +203,9 @@ namespace UnityEngine.UI.Extensions
private float GetScrollOffset(float position, float listAnchorPosition, float targetLength, float maskLength)
{
if (position < listAnchorPosition)
if (position < listAnchorPosition + (targetLength / 2))
{
return listAnchorPosition - position;
return (listAnchorPosition + maskLength) - (position - targetLength);
}
else if (position + targetLength > listAnchorPosition + maskLength)
{