yiboyang / graphrel

Intuitive graph theory explorer powered by d3
http://yiboyang.github.io/graphrel
20 stars 4 forks source link

Node enumeration bug. #1

Closed TusharRakheja closed 8 years ago

TusharRakheja commented 8 years ago

After the default 0 and 1, the next node added is numbered 3, instead of 2. I believe this bug is in line 28 in graph.js.

lastNodeId = 2, should be lastNodeId = 1, I believe. (But I'm not sure about anything JavaScript, so. :P)

yiboyang commented 8 years ago

Indeed I forgot to update lastNodeId when I used a different initial configuration.

Thanks for testing!