lucaong / jQCloud

jQuery plugin for drawing neat word clouds that actually look like clouds
MIT License
646 stars 293 forks source link

Division by zero if all words have the same weight #19

Closed Grepsy closed 12 years ago

Grepsy commented 12 years ago

The weight calulation is invalid when all the weights in the list are the same. This patch checks for this situation and uses a default weight of '5' in case it happens.

Grepsy commented 12 years ago

Sorry about that. I think I've fixed it, but couldn't run the tests yet (Windows without Ruby here at work, so can't build). I'll test later today at home and run the tests.

Grepsy commented 12 years ago

Ok, all tests are passing now. Should be ok.

lucaong commented 12 years ago

Great, thank you! Your fix was merged and included in v0.2.9.