我正在使用最新版本的cytoscape.js和cola.js。当我更改“ edgelength”时,什么也没有发生。
我该怎么做?
您可以在布局选项中指定edgeLength
,edgeSymDiffLength
或edgeJaccardLength
之一。
来自the docs:
// different methods of specifying edge length
// each can be a constant numerical value or a function like `function( edge ){ return 2; }`
edgeLength: undefined, // sets edge length directly in simulation
edgeSymDiffLength: undefined, // symmetric diff edge length in simulation
edgeJaccardLength: undefined, // jaccard edge length in simulation
由于这是一种力导向的布局,您可以设置多个约束,所以如果过度约束系统,可能无法获得所需的效果-这很容易做到。考虑到某些边缘长度的约束可能与其他边缘长度的约束相矛盾。