From b098a499918c417c66e03c8d067dd253ccf2e9e3 Mon Sep 17 00:00:00 2001 From: lrc <571244399@qq.com> Date: Fri, 17 Jul 2026 09:40:57 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=A1=A8=E6=A0=BC=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E5=89=94=E9=99=A4=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Runtime/XTable/Rendering/Component/XericUIActionTable.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Runtime/XTable/Rendering/Component/XericUIActionTable.cs b/Runtime/XTable/Rendering/Component/XericUIActionTable.cs index b549e58..5f49cc1 100644 --- a/Runtime/XTable/Rendering/Component/XericUIActionTable.cs +++ b/Runtime/XTable/Rendering/Component/XericUIActionTable.cs @@ -1594,7 +1594,7 @@ namespace XericUI.XTable.Rendering.Component if (vt != null && ct != null) { float sx = Mathf.Max(0, -ct.anchoredPosition.x); - float sy = Mathf.Max(0, ct.anchoredPosition.y); + float sy = Mathf.Max(0, -ct.anchoredPosition.y); m_VisibleRect = new Rect(sx, sy, vt.rect.width, vt.rect.height); } } @@ -2020,7 +2020,7 @@ namespace XericUI.XTable.Rendering.Component if (m_ScrollRect != null && m_ScrollRect.content != null) { scrollOffset.x = Mathf.Max(0, -m_ScrollRect.content.anchoredPosition.x); - scrollOffset.y = Mathf.Max(0, m_ScrollRect.content.anchoredPosition.y); + scrollOffset.y = Mathf.Max(0, -m_ScrollRect.content.anchoredPosition.y); } // 调整背景位置(随滚动偏移移动,保持在视口可见范围内) @@ -2061,7 +2061,7 @@ namespace XericUI.XTable.Rendering.Component float tableX = localPoint.x - rectTransform.rect.xMin; float tableY = rectTransform.rect.yMax - localPoint.y; - float scrollY = m_ScrollRect != null ? Mathf.Max(0, m_ScrollRect.content.anchoredPosition.y) : 0; + float scrollY = m_ScrollRect != null ? Mathf.Max(0, -m_ScrollRect.content.anchoredPosition.y) : 0; float scrollX = m_ScrollRect != null ? Mathf.Max(0, -m_ScrollRect.content.anchoredPosition.x) : 0; tableX += scrollX - m_ContentOffset; tableY += scrollY - m_ContentOffset;