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

使用 inlineText 时,为啥要用个 while 循环比较 #399

Open
github-lxb opened this issue Nov 7, 2022 · 1 comment
Open

使用 inlineText 时,为啥要用个 while 循环比较 #399

github-lxb opened this issue Nov 7, 2022 · 1 comment

Comments

@github-lxb
Copy link

while ((alreadyCount - start + 1) * preWidth < leftWidth && alreadyCount < textLength) {
alreadyCount++;
}

会导致死循环,我直接把外层的 while 注释掉,只留里面的 alreadyCount++ 不会出现死循环

@androidjeffery
Copy link

厉害

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

No branches or pull requests

2 participants