怎么修改节点之间连接线的长短?How to modify the length of the connection line?
hi 朋友 你的springy很好用,但是怎么修改连接线的长短呢?我修改了springyui.js里的很多属性都不生效,展现出来的图太大了; 请告诉我怎么修改节点之间的连接线;
Hi buddy Your springy is very easy to use,and pretty graph!But how to modify the length of the connection line it? I modify the springyui.js , many of the properties are not effective, the show is too large; Please teach me how to modify the connection line between the nodes,make them shortly; thank you~~~
Hey yep, you can set an edge’s length in its metadata when creating it e.g.
graph.newEdge(node1, node2, { length: 2 ); // default length is 1, so a value if 2 should be roughly twice as long
sorry i didn't use this function... i use a json String like this: var graph = new Springy.Graph(); var json= queryDependent(param,'id');// a json response;
graph.loadJSON(json);// load json and draw
var springy = $('#canvasDependent').springy({
graph: graph
});
so for this situation maybe i should change springyui.js? please tell me where i can set the length~~