修复表格在做成预制体的情况下,且存在冻结单元格的时候,冻结单元格的内容复用会出现冻结在原地的情况
This commit is contained in:
@@ -177,7 +177,7 @@ namespace XericUI.XTable.Rendering.Component
|
||||
{
|
||||
if (string.IsNullOrEmpty(data.Text)) return;
|
||||
|
||||
var txt = m_Assembler.GetText(cellId, "cell_text", cellNS);
|
||||
var txt = m_Assembler.GetText(cellId, "cell_text", cellNS, ContentTransform);
|
||||
if (txt == null) return;
|
||||
txt.Rect.anchoredPosition = new Vector2(cellX + CellPadding, cellY);
|
||||
txt.Rect.sizeDelta = new Vector2(cellW - CellPadding2, cellH);
|
||||
@@ -201,7 +201,7 @@ namespace XericUI.XTable.Rendering.Component
|
||||
if (data.Image == null) return;
|
||||
|
||||
Sprite sprite = GetOrCreateSprite(data.Image);
|
||||
var img = m_Assembler.GetImage(cellId, "cell_image", cellNS);
|
||||
var img = m_Assembler.GetImage(cellId, "cell_image", cellNS, ContentTransform);
|
||||
if (img == null) return;
|
||||
img.Rect.anchoredPosition = new Vector2(cellX + CellPadding, cellY);
|
||||
img.Rect.sizeDelta = new Vector2(cellW - CellPadding2, cellH);
|
||||
|
||||
Reference in New Issue
Block a user