Skip to content

fix: line width is too small to display any characters - #1956

Merged
wang1212 merged 1 commit into
releasefrom
fix/wordWrap
Jun 24, 2025
Merged

fix: line width is too small to display any characters#1956
wang1212 merged 1 commit into
releasefrom
fix/wordWrap

Conversation

@wang1212

@wang1212 wang1212 commented Jun 23, 2025

Copy link
Copy Markdown
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

💡 Background and solution

In the past, implementations of text line breaks that encountered a situation where the current line could not display any characters would continue to test the next line until the maxlines limit was encountered.

If the wordWrapWidth was so small that it couldn't even display a single character, it made no sense to continue testing subsequent lines, and created redundant blank lines.

Now, if the current line encounters an arbitrary character that cannot be displayed, it will be terminated immediately.

📝 Changelog

Language Changelog
🇺🇸 English fix: terminate immediately when the line width is too small to display any characters
🇨🇳 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 requested a review from Alexzjt June 24, 2025 02:21

@Alexzjt Alexzjt left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK

@wang1212
wang1212 merged commit 43c533f into release Jun 24, 2025
2 checks passed
@wang1212
wang1212 deleted the fix/wordWrap branch June 24, 2025 02:24
wang1212 added a commit that referenced this pull request Jun 27, 2025
* fix: 🐛 Fix invalid URL links (#1951)

* fix: terminate immediately when the line width is too small to display any characters (#1956)

* docs: update documentation and examples

* fix(svg-renderer): add x and y attributes to foreignObject in SVGRenderer (#1961)

Add support for x and y attributes in foreignObject elements to ensure proper positioning in SVG rendering.

* docs: update documentation formatting and update dependencies

* perf: optimize element event distribution and attribute update process (#1944)

* fix(plugin-box2d): remove trailing slash from BOX2D_UMD_DIR

* perf: optimize element event distribution and attribute update process

* feat: use RIC to avoid frequent calls syncRTree (#1960)

* perf: optimize element event distribution and attribute update process

* perf: 增加enableRICSyncRTree

---------

Co-authored-by: wang1212 <mrwang1212@126.com>

* chore: fix lint error

* refactor: enhance performance optimization with experimental features

- Move performance-related configurations from runtime to canvas config
- Introduce experimental feature flags in CanvasConfig for better control
- Optimize event propagation and attribute updates
- Add RIC (RequestIdleCallback) for syncRTree operations
- Improve type safety and code organization

---------

Co-authored-by: huiyu.zjt <Alexzjt@users.noreply.github.com>

* chore: add changeset

* chore(release): bump version (#1958)

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

---------

Co-authored-by: iaosee <iaosee@outlook.com>
Co-authored-by: huiyu.zjt <Alexzjt@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+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