timdream / wordcloud2.js

Tag cloud/Wordle presentation on 2D canvas or HTML

Home Page:https://wordcloud2-js.timdream.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

"Uncaught RangeError: Maximum call stack size exceeded" on small screen sizes

vasilzhigilei opened this issue · comments

Uncaught RangeError: Maximum call stack size exceeded
at getTextInfo (wordcloud2.js:514)
at putWord (wordcloud2.js:913)
at putWord (wordcloud2.js:987)
...

when wordcloud2 tries to put words into an area on a small screen size. Some of the words do get big in size, and there are a fair number of words. This error lags the mobile device, ruining the UX. Any way to avoid this?

Update: Adding abortThreshold: 1000, to options avoids the issue, but it doesn't seem like a very good fix (just aborting after 1 second doesn't seem like the best solution- not all words appear on small screen sizes, but at least the error doesn't get thrown anymore)