Here is the initial change to the code to have access to the extra data we pass in the 2d array.
I would like to add a test for each callback, unless you think it's not necessary (no breaking change).
However I'm wondering why in the tests the list array is like this:
Grumpy,5.33935546875,wizards,4.67193603515625,make,8.4375,toxic,5.9326171875,brew,2.669677734375,for,4.74609375,the,2.669677734375,evil,2.00225830078125,Queen,1.8771171569824219,and,2.669677734375,Jack,2.669677734375
Instead of:
[[Grumpy, 5.33935546875], [wizards, 4.67193603515625], ...]
How should I add the extra data for each word ?
https://github.com/timdream/wordcloud2.js/issues/172
Here is the initial change to the code to have access to the extra data we pass in the 2d array. I would like to add a test for each callback, unless you think it's not necessary (no breaking change). However I'm wondering why in the tests the list array is like this:
Grumpy,5.33935546875,wizards,4.67193603515625,make,8.4375,toxic,5.9326171875,brew,2.669677734375,for,4.74609375,the,2.669677734375,evil,2.00225830078125,Queen,1.8771171569824219,and,2.669677734375,Jack,2.669677734375
Instead of:[[Grumpy, 5.33935546875], [wizards, 4.67193603515625], ...]
How should I add the extra data for each word ?