Hufe921 / canvas-editor

rich text editor by canvas/svg
https://hufe.club/canvas-editor-docs
MIT License
3.43k stars 498 forks source link

缩放比例(scale)调整后单词与标点断行(wordBreak)失效 #666

Closed JiaJunLee closed 1 month ago

JiaJunLee commented 2 months ago

version

0.9.79

Link to minimal reproduction

No response

Steps to reproduce

  1. 在任意行尾部输入英文内容
  2. 调整缩放比例

image image

What is expected?

缩放比例变化时,wordBreak配置也应该生效

What is actually happening?

文档中存在英文内容,用户缩放编辑器时,可能导致结尾单词被折行

System Info

No response

Any additional comments?

No response

Hufe921 commented 2 months ago

wordBreak配置的什么

JiaJunLee commented 2 months ago

wordBreak配置的什么

wordBreak: WordBreak.BREAK_WORD

Hufe921 commented 2 months ago

无法复现,发一下系统信息,浏览器版本,屏幕分辨率,缩放比等

JiaJunLee commented 2 months ago

Reproduce: https://codesandbox.io/p/sandbox/canvas-editor-word-break-bug-reproduce-lgwnpj

Local ENV: BROWSER & OS: Chrome 126 on Windows 10 COMPUTER SCREEN: 1920 x 1080 Pixels BROWSER WINDOW SIZE: 1920 x 1050 Pixels