mirror of
https://github.com/sinai-dev/UnityExplorer.git
synced 2025-01-06 01:23:31 +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()
|
||||
{
|
||||
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>
|
||||
|
Loading…
x
Reference in New Issue
Block a user