mirror of
https://github.com/GrahamKracker/UnityExplorer.git
synced 2025-07-01 19:13:03 +08:00
Add jump to top logic for rebuild and refresh
This commit is contained in:
@ -107,6 +107,17 @@ namespace UnityExplorer.UI.Widgets
|
||||
public void Rebuild()
|
||||
{
|
||||
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()
|
||||
@ -595,7 +606,7 @@ namespace UnityExplorer.UI.Widgets
|
||||
bottomDataIndex = poolStartIndex + CellPool.Count - 1;
|
||||
RefreshCells(true, false);
|
||||
|
||||
//UpdateSliderHandle(true);
|
||||
UpdateSliderHandle(true);
|
||||
}
|
||||
|
||||
/// <summary>Use <see cref="UIFactory.CreateScrollPool"/></summary>
|
||||
|
Reference in New Issue
Block a user