增加Commentlayer设置层级

This commit is contained in:
monitor1394
2025-03-22 09:24:46 +08:00
parent 8bc66ca30a
commit 9e07617cc4
6 changed files with 48 additions and 6 deletions

View File

@@ -23,8 +23,12 @@ namespace XCharts.Runtime
chart.chartMaxAnchor,
chart.chartPivot,
chart.chartSizeDelta, -1, chart.childrenNodeNames);
var siblingIndex = comment.layer == CommentLayer.Upper
? chart.topPainter.transform.GetSiblingIndex() - 1
: chart.painter.transform.GetSiblingIndex() + 1;
commentObj.SetActive(comment.show);
commentObj.transform.SetSiblingIndex(siblingIndex);
commentObj.hideFlags = chart.chartHideFlags;
ChartHelper.HideAllObject(commentObj);
for (int i = 0; i < comment.items.Count; i++)