Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

怎么修改节点之间连接线的长短?How to modify the length of the connection line? #86

Open
LorrieIory opened this issue Nov 22, 2016 · 2 comments

Comments

@LorrieIory
Copy link

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~~~

@dhotson
Copy link
Owner

dhotson commented Nov 22, 2016

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

@LorrieIory
Copy link
Author

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~~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants