diff --git a/Runtime/RecyclerView/RecyclerView.cs b/Runtime/RecyclerView/RecyclerView.cs index 9cc55bf..5f5c0e7 100644 --- a/Runtime/RecyclerView/RecyclerView.cs +++ b/Runtime/RecyclerView/RecyclerView.cs @@ -427,11 +427,6 @@ namespace AlicizaX.UI /// public Action OnIndexChanged; - /// - /// 当滚动位置发生变化时触发。 - /// - public Action OnScrollValueChanged; - #endregion #region Unity Lifecycle @@ -968,10 +963,6 @@ namespace AlicizaX.UI float targetPosition = CalculateScrollPositionWithAlignment(index, alignment, offset); - if (UGListExtensions.DebugScrollTo) - { - Debug.Log($"[RecyclerView] ScrollToWithAlignment: index={index}, alignment={alignment}, offset={offset}, targetPosition={targetPosition}, maxPosition={scroller.MaxPosition}"); - } if (duration > 0 && smooth) { @@ -1022,11 +1013,6 @@ namespace AlicizaX.UI // 叠加调用方传入的额外偏移量。 targetPosition += offset; - if (UGListExtensions.DebugScrollTo) - { - Debug.Log($"[RecyclerView] CalculateScrollPosition: index={index}, itemPosition={itemPosition}, itemSize={itemSize}, viewportLength={viewportLength}, contentLength={contentLength}, targetPosition={targetPosition}, maxPosition={scroller.MaxPosition}"); - } - // 将结果限制在可滚动范围内。 return Mathf.Clamp(targetPosition, 0, scroller.MaxPosition); } @@ -1074,7 +1060,6 @@ namespace AlicizaX.UI UpdateScrollbarValue(position); UpdateVisibleRange(); layoutManager.DoItemAnimation(); - OnScrollValueChanged?.Invoke(); } /// diff --git a/Runtime/RecyclerView/UGListExtensions.cs b/Runtime/RecyclerView/UGListExtensions.cs index 9cd164c..c7150db 100644 --- a/Runtime/RecyclerView/UGListExtensions.cs +++ b/Runtime/RecyclerView/UGListExtensions.cs @@ -8,10 +8,6 @@ namespace AlicizaX.UI /// public static class UGListExtensions { - /// - /// 控制是否输出滚动定位调试日志。 - /// - public static bool DebugScrollTo { get; set; } = false; /// /// 将列表滚动到指定索引,并按给定对齐方式定位。 @@ -40,11 +36,6 @@ namespace AlicizaX.UI return; } - if (DebugScrollTo) - { - Debug.Log($"[UGListExtensions] ScrollTo: index={index}, alignment={alignment}, offset={offset}, smooth={smooth}, duration={duration}"); - } - ugList.RecyclerView.ScrollToWithAlignment(index, alignment, offset, smooth, duration); }