Skip to content

Commit

Permalink
fix: 修复行头底部存在多行文本, 初始化和滚动时文本展示溢出的问题 (#3000)
Browse files Browse the repository at this point in the history
* fix: 修复行头底部存在多行文本时展示溢出的问题

* fix: 去除错误提交
  • Loading branch information
lijinke666 authored Nov 29, 2024
1 parent b626986 commit 6204839
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/s2-core/src/cell/row-cell.ts
Original file line number Diff line number Diff line change
Expand Up @@ -444,8 +444,8 @@ export class RowCell extends HeaderCell<RowHeaderConfig> {
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,
Expand All @@ -456,7 +456,7 @@ export class RowCell extends HeaderCell<RowHeaderConfig> {
{
align: normalizeTextAlign(textStyle.textBaseline!),
size: {
textSize: textStyle.fontSize!,
textSize: textHeight,
},
padding: {
start: cell.padding.top,
Expand All @@ -476,7 +476,7 @@ export class RowCell extends HeaderCell<RowHeaderConfig> {
const iconY = getVerticalIconPosition(
iconStyle?.size!,
textStart,
textStyle.fontSize!,
textHeight,
textStyle.textBaseline!,
);

Expand Down

0 comments on commit 6204839

Please sign in to comment.