-
Notifications
You must be signed in to change notification settings - Fork 196
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: 修复配置了多行文本但实际渲染的文本未换行时, 单元格高度也会自适应调整的问题 #2705
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Size Change: +107 B (+0.03%) Total Size: 319 kB
ℹ️ View Unchanged
|
你好, @lijinke666 CI 执行失败, 请点击 [Details] 按钮查看, 并根据日志修复。 Hello, @lijinke666 CI run failed, please click the [Details] button for detailed log information and fix it. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## next #2705 +/- ##
==========================================
+ Coverage 75.77% 80.08% +4.31%
==========================================
Files 257 176 -81
Lines 11994 10096 -1898
Branches 2464 2311 -153
==========================================
- Hits 9088 8085 -1003
+ Misses 1398 614 -784
+ Partials 1508 1397 -111 ☔ View full report in Codecov by Sentry. |
🎉 This PR is included in version @antv/s2-v2.0.0-next.20 🎉 The release is available on: Your semantic-release bot 📦🚀 |
🎉 This PR is included in version @antv/s2-react-v2.0.0-next.19 🎉 The release is available on: Your semantic-release bot 📦🚀 |
👀 PR includes
🐛 Bugfix
📝 Description
S2/packages/s2-core/src/cell/base-cell.ts
Lines 468 to 487 in 0af329d
在布局时, 会先计算叶子节点的宽度, 然后反向计算父级节点, 父级节点由于先渲染, 计算多行文本的高度时, 由于依赖
maxTextWidth
为 0, 会导致 G 将一行文本计算出来多行, 比如 "成都市" => ['成','都', '市'], 然后 S2 按 3行去自适应高度🖼️ Screenshot
🔗 Related issue link
🔍 Self-Check before the merge