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: rendering error when line break appears at the beginning of text #1871

Merged
merged 1 commit into from
Dec 18, 2024

Conversation

wang1212
Copy link
Member

🤔 This is a ...

  • New feature
  • Bug fix
  • Site / Document optimization
  • TypeScript definition update
  • Refactoring
  • Performance improvement
  • Code style optimization
  • Test Case
  • Branch merge
  • Other (about what?)

🔗 Related issue link

see antvis/S2#3040

💡 Background and solution

If the first character is a line break, the first line of text is null, resulting in an error in getting the character length. We can just check this boundary condition.

📝 Changelog

Language Changelog
🇺🇸 English fix: rendering error when line break appears at the beginning of text
🇨🇳 Chinese fix: 文本首字符为换行符时渲染异常

☑️ Self Check before Merge

  • Doc is updated/provided or not needed
  • Demo is updated/provided or not needed
  • TypeScript definition is updated/provided or not needed
  • Changelog is provided or not needed

@wang1212 wang1212 changed the title fix: lineDash支持多位数组 (#1867) fix: rendering error when line break appears at the beginning of text Dec 18, 2024
@wang1212 wang1212 merged commit 2d71558 into release Dec 18, 2024
2 checks passed
@wang1212 wang1212 deleted the fix/text branch December 18, 2024 12:10
wang1212 added a commit that referenced this pull request Dec 20, 2024
* fix: lineDash支持多位数组 (#1867)

* chore: add changeset

* fix: rendering error when line break appears at the beginning of text (#1871)

* docs: 修复异常示例

* refactor: reduce global redundant code (#1872)

* refactor: reduce global redundant code

* chore: add changeset

* fix: svg path element A command drawing abnormality (#1874)

* Version Packages (#1869)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

---------

Co-authored-by: HuangLiangchen <[email protected]>
Co-authored-by: wang1212 <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants