timdream / wordcloud2.js

Tag cloud/Wordle presentation on 2D canvas or HTML
https://wordcloud2-js.timdream.org/
MIT License
2.34k stars 510 forks source link

feat: allow multiple timers for multi-canvas rendering #174

Closed rafrocha closed 3 years ago

rafrocha commented 3 years ago

This PR allows multiple concurrent rendering by allowing different timers to be added whenever the WordCloud function is called. When I was trying to render wordcloud in multiple canvases in React - separate components - I noticed the single timer instance can end up stopping the wrong canvas from putting words.

rafrocha commented 3 years ago

Thank you for your timely response! Is there a new version with this change coming out soon?

Appreciate it, Tim! @timdream

timdream commented 3 years ago

@.***` published.