改一个bug

This commit is contained in:
2025-05-24 14:34:12 +08:00
parent 9a02c62ac4
commit 82790c3d86
5 changed files with 17211 additions and 16836 deletions

View File

@@ -39,6 +39,7 @@ namespace Ichni.Editor
if (findparent && targetElement.connectedTab != null)
{
targetElement.connectedTab.expandButton.onClick.Invoke();
return;
}
else if (targetElement.connectedTab != null)
{
@@ -47,16 +48,19 @@ namespace Ichni.Editor
else
{
FindTab(targetElement.parentElement, true);
targetElement.connectedTab.tabButton.onClick.Invoke();
if (!findparent)
{
targetElement.connectedTab.tabButton.onClick.Invoke();
}
else
{
targetElement.connectedTab.expandButton.onClick.Invoke();
return;
}
}
GameElement gameElement = targetElement;
HierarchyTab tab = targetElement.connectedTab;
while (tab is null)
{
gameElement = gameElement.parentElement;
if (gameElement is null) return;
tab = gameElement.connectedTab;
}
float Tablocalpos = (-tab.transform.localPosition.y) - (tabContainer.sizeDelta.y / 4f);
float pct = Tablocalpos / tabContainer.sizeDelta.y;
scrollRect.verticalNormalizedPosition = 1f - pct;