mirror of
https://github.com/sinai-dev/UnityExplorer.git
synced 2025-01-07 18:13:35 +08:00
Add jump to top logic for rebuild and refresh
This commit is contained in:
parent
ebb89b1b8b
commit
59156492e7
@ -107,6 +107,17 @@ namespace UnityExplorer.UI.Widgets
|
|||||||
public void Rebuild()
|
public void Rebuild()
|
||||||
{
|
{
|
||||||
RecreateCellPool(true, true, null);
|
RecreateCellPool(true, true, null);
|
||||||
|
writingLocked = false;
|
||||||
|
Content.anchoredPosition = Vector2.zero;
|
||||||
|
UpdateSliderHandle(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void RefreshAndJumpToTop()
|
||||||
|
{
|
||||||
|
bottomDataIndex = CellPool.Count - 1;
|
||||||
|
RefreshCells(true);
|
||||||
|
Content.anchoredPosition = Vector2.zero;
|
||||||
|
UpdateSliderHandle(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void EnableTempCache()
|
public void EnableTempCache()
|
||||||
@ -595,7 +606,7 @@ namespace UnityExplorer.UI.Widgets
|
|||||||
bottomDataIndex = poolStartIndex + CellPool.Count - 1;
|
bottomDataIndex = poolStartIndex + CellPool.Count - 1;
|
||||||
RefreshCells(true, false);
|
RefreshCells(true, false);
|
||||||
|
|
||||||
//UpdateSliderHandle(true);
|
UpdateSliderHandle(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>Use <see cref="UIFactory.CreateScrollPool"/></summary>
|
/// <summary>Use <see cref="UIFactory.CreateScrollPool"/></summary>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user