From 620483901c40d64e2e1e6be6753a08ee26f35677 Mon Sep 17 00:00:00 2001 From: Jinke Li Date: Fri, 29 Nov 2024 14:09:22 +0800 Subject: [PATCH] =?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,=20=E5=88=9D=E5=A7=8B=E5=8C=96=E5=92=8C=E6=BB=9A?= =?UTF-8?q?=E5=8A=A8=E6=97=B6=E6=96=87=E6=9C=AC=E5=B1=95=E7=A4=BA=E6=BA=A2?= =?UTF-8?q?=E5=87=BA=E7=9A=84=E9=97=AE=E9=A2=98=20(#3000)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: 修复行头底部存在多行文本时展示溢出的问题 * fix: 去除错误提交 --- 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..5ae2898241 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 = 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!, );