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

🐛 cornerCellmeasureText.textBaseline 和其它 cell 的 measureText.textBaseline默认值不一样 #2957

Closed
1 of 5 tasks
liqiuqiui opened this issue Nov 1, 2024 · 4 comments · Fixed by #2966
Closed
1 of 5 tasks
Assignees
Labels
🐛 bug 这个是一个 bug next 2.0-next 版本的问题 released on @next

Comments

@liqiuqiui
Copy link

liqiuqiui commented Nov 1, 2024

🏷 Version

Package Version
@antv/s2 2.0.0-next.30
@antv/s2-react
@antv/s2-vue

Sheet Type

  • PivotSheet
  • TableSheet
  • GridAnalysisSheet
  • StrategySheet
  • EditableSheet

🖋 Description

角头虚拟数值字段文本在配置了cornerCell.measureText后不能垂直居中了

⌨️ Code Snapshots

未配置 textBaseline 时,cornerCell.measureText和其它单元格的 measureText 的默认值不一样

image

显示配置 textBaseline: "middle" 可居中

image

🔗 Reproduce Link

在线复现链接

🤔 Steps to Reproduce

😊 Expected Behavior

😅 Current Behavior

💻 System information

Environment Info
System
Browser
@github-actions github-actions bot added the next 2.0-next 版本的问题 label Nov 1, 2024
@liqiuqiui liqiuqiui changed the title 🐛 角头虚拟数值字段文本在配置了 🐛 角头虚拟数值字段文本在配置了cornerCell.measureText后不能垂直居中了 Nov 1, 2024
@liqiuqiui liqiuqiui changed the title 🐛 角头虚拟数值字段文本在配置了cornerCell.measureText后不能垂直居中了 🐛 cornerCellmeasureText.textBaseline 和其它 cell 的 measureText.textBaseline默认值不一样 Nov 1, 2024
@liqiuqiui liqiuqiui reopened this Nov 1, 2024
@lijinke666 lijinke666 self-assigned this Nov 8, 2024
@lijinke666 lijinke666 added the 🐛 bug 这个是一个 bug label Nov 8, 2024
Copy link
Contributor

github-actions bot commented Nov 8, 2024

你好 @liqiuqiui,很抱歉给你带来了不好的体验, 我们会尽快排查问题并修复, 请关注后续发布日志.

Hello, @liqiuqiui, We are so sorry for the bad experience. We will troubleshoot and fix the problem as soon as possible. Please pay attention to the follow-up change logs.

@lijinke666
Copy link
Member

lijinke666 commented Nov 8, 2024

感谢反馈, 看了下, cornerCell 的默认主题没有 measureText 的配置, 所以默认取成 top 了, 这种场景漏掉了, 预期应该都是 textBaseline: 'middle'

if (this.isMeasureField()) {
style = measureText || text;
} else if (this.isBolderText()) {

@lijinke666
Copy link
Member

🎉 This issue has been resolved in version @antv/s2-v2.0.0-next.32 🎉

The release is available on:

Your semantic-release bot 📦🚀

@lijinke666
Copy link
Member

🎉 This issue has been resolved in version @antv/s2-react-components-v1.1.0-next.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug 这个是一个 bug next 2.0-next 版本的问题 released on @next
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants