lucaong / jQCloud

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

Words rotated around wrong center point #5

Closed isamochernov closed 13 years ago

isamochernov commented 13 years ago

When moving a word around to find unoccupied space, the formula for it's left position should be

left = origin_x - width / 2.0 + radius * Math.cos(angle) * aspect_ratio;

at the moment the width is multiplied by aspect ratio and thus the word is rotated around wrong center position for aspect_ratio not equal to 1. This gives sometimes unbalanced layouts.

lucaong commented 13 years ago

True. Just fixed this in version 0.1.8. Thank you!