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

Possible improvements #59

Open
SebWiers opened this issue Jan 13, 2016 · 1 comment
Open

Possible improvements #59

SebWiers opened this issue Jan 13, 2016 · 1 comment

Comments

@SebWiers
Copy link

I've been using this for a widget at work, had PM ask for a lot of changes and have implemented some improvements, would be happy to do a code for w/ changes if you like.

  • words sometimes clip of bottom : the top position of a word sometimes results in it being partially rendered, with some or most of the word outside the visible area. I fixed this by adding a condition at the top the hitTest function : if (this.options.height && elem.top + 2*elem.height >= this.options.height) { return true; }
  • cloud density is sparse : I fixed this (for elliptic spiral only) by twiddling the radius and angle growth. Obviously this can slow down draw speed, but I got much greater density without much cost. I hard coded the changes, options for the growth numbers would be ideal; some number combinations produce very nice shapes that are not so much clouds as curving word arcs.
  • lack of dynamic resize to fit all words : while you can remove over flowing words, there's no option to auto-size to fit all words. I wrote such capability by using an afterWordRender function to check how many elements were rendered (with removeOverflowing : true) and adjusting the fontSize attributes (decreased by amount proportional to number of words not yet shown) then re-drawing.
@mwpastore
Copy link

@SebWiers, would you possibly be willing to publish your fork of this repo with these changes? It would help me out a great deal. Thanks in advance.

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