From 26527779315316f47946a44d64cf238371ccc80d Mon Sep 17 00:00:00 2001 From: lijinke666 Date: Thu, 28 Nov 2024 19:25:38 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E8=A1=8C=E5=A4=B4?= =?UTF-8?q?=E5=BA=95=E9=83=A8=E5=AD=98=E5=9C=A8=E5=A4=9A=E8=A1=8C=E6=96=87?= =?UTF-8?q?=E6=9C=AC=E6=97=B6=E5=B1=95=E7=A4=BA=E6=BA=A2=E5=87=BA=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/s2-core/src/cell/row-cell.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/s2-core/src/cell/row-cell.ts b/packages/s2-core/src/cell/row-cell.ts index 03840d442b..7594f6e0cc 100644 --- a/packages/s2-core/src/cell/row-cell.ts +++ b/packages/s2-core/src/cell/row-cell.ts @@ -444,8 +444,8 @@ export class RowCell extends HeaderCell { const textArea = this.getTextArea(); const textStyle = this.getTextStyle(); const { cell, icon: iconStyle } = this.getStyle(); - const viewport = this.handleViewport(); + const textHeight = textStyle.fontSize || this.getActualTextHeight(); const { textStart } = adjustTextIconPositionWhileScrolling( viewport, @@ -456,7 +456,7 @@ export class RowCell extends HeaderCell { { align: normalizeTextAlign(textStyle.textBaseline!), size: { - textSize: textStyle.fontSize!, + textSize: textHeight, }, padding: { start: cell.padding.top, @@ -476,7 +476,7 @@ export class RowCell extends HeaderCell { const iconY = getVerticalIconPosition( iconStyle?.size!, textStart, - textStyle.fontSize!, + textHeight, textStyle.textBaseline!, ); From 7d0d2f6bc103b0a107932e8c90b359b6c1e8d48d Mon Sep 17 00:00:00 2001 From: lijinke666 Date: Thu, 28 Nov 2024 19:30:57 +0800 Subject: [PATCH 2/2] =?UTF-8?q?fix:=20=E5=8E=BB=E9=99=A4=E9=94=99=E8=AF=AF?= =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/s2-core/src/cell/row-cell.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/s2-core/src/cell/row-cell.ts b/packages/s2-core/src/cell/row-cell.ts index 7594f6e0cc..5ae2898241 100644 --- a/packages/s2-core/src/cell/row-cell.ts +++ b/packages/s2-core/src/cell/row-cell.ts @@ -445,7 +445,7 @@ export class RowCell extends HeaderCell { const textStyle = this.getTextStyle(); const { cell, icon: iconStyle } = this.getStyle(); const viewport = this.handleViewport(); - const textHeight = textStyle.fontSize || this.getActualTextHeight(); + const textHeight = this.getActualTextHeight(); const { textStart } = adjustTextIconPositionWhileScrolling( viewport,