Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: 修复行头底部存在多行文本, 初始化和滚动时文本展示溢出的问题 #3000

Merged
merged 2 commits into from
Nov 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading