regorxxx / Music-Graph

An open source graph representation of most genres and styles found on popular, classical and folk music. Usually used to compute similarity (by distance) between 2 sets of genres/styles.
https://regorxxx.github.io/Music-Graph/
GNU Affero General Public License v3.0
31 stars 2 forks source link

[BUG] calcGraphDistance(...) is not iterable #3

Closed username116 closed 8 months ago

username116 commented 8 months ago

I think there's an error in Draw Graph.html

When I move the cursor over a node, it is highlighted. But the list of other linked genres is no longer displayed on the top left.

This seems to be caused by a recent change on calcGraphDistance(). The console shows this line.

Console ``` Uncaught TypeError: calcGraphDistance(...) is not iterable showLinks https://regorxxx.github.io/Music-Graph/Draw Graph.html:360 E https://regorxxx.github.io/Music-Graph/helpers-external/ngraph-html/vivagraph.js:1 b https://regorxxx.github.io/Music-Graph/helpers-external/ngraph-html/vivagraph.js:1 showLinks https://regorxxx.github.io/Music-Graph/Draw Graph.html:350 renderGraph https://regorxxx.github.io/Music-Graph/Draw Graph.html:174 jQuery 10 renderGraph https://regorxxx.github.io/Music-Graph/Draw Graph.html:166 addNode https://regorxxx.github.io/Music-Graph/helpers-external/ngraph-html/vivagraph.js:2 y https://regorxxx.github.io/Music-Graph/helpers-external/ngraph-html/vivagraph.js:2 A https://regorxxx.github.io/Music-Graph/helpers-external/ngraph-html/vivagraph.js:1 N https://regorxxx.github.io/Music-Graph/helpers-external/ngraph-html/vivagraph.js:2 run https://regorxxx.github.io/Music-Graph/helpers-external/ngraph-html/vivagraph.js:2 renderGraph https://regorxxx.github.io/Music-Graph/Draw Graph.html:252 precompute https://regorxxx.github.io/Music-Graph/Draw Graph.html:114 precompute https://regorxxx.github.io/Music-Graph/Draw Graph.html:109 setTimeout handler*precompute https://regorxxx.github.io/Music-Graph/Draw Graph.html:108 precompute https://regorxxx.github.io/Music-Graph/Draw Graph.html:109 setTimeout handler*precompute https://regorxxx.github.io/Music-Graph/Draw Graph.html:108 precompute https://regorxxx.github.io/Music-Graph/Draw Graph.html:109 setTimeout handler*precompute https://regorxxx.github.io/Music-Graph/Draw Graph.html:108 precompute https://regorxxx.github.io/Music-Graph/Draw Graph.html:109 ... 2 Draw Graph.html:360:57 ```
regorxxx commented 8 months ago

Fixed