grigoryk / dracula-js-fork

Dracula Graph Library Experimental Fork
http://www.graphdracula.net/
34 stars 9 forks source link

Error when tree growing up after down #1

Open Teutonick opened 13 years ago

Teutonick commented 13 years ago

this.levels[i] is undefined [Break on this error] c = this.levels[i].length - 1;

dracula_graph.js ( 319)

I have tree like this http://my.jetscreenshot.com/3985/20101125-mbsy-8kb

And with var layouter = new Graph.Layout.Spring(g); layouter.layout(); it constructs correctly ! but with .tree - error =(

grigoryk commented 13 years ago

Thanks, this simple tree replicates the issue: g.addEdge("2", "1", {directed: true}); g.addEdge("13", "2", {directed: true}); g.addEdge("11", "2", {directed: true}); g.addEdge("12", "11", {directed: true}); g.addEdge("12", "14", {directed: true});

Let's see how to fix this now :-)