【发布时间】:2015-01-21 05:29:29
【问题描述】:
【问题讨论】:
-
你尝试了什么?显示代码。
-
您可以在以下位置查看结构:github.com/cytoscape/cytoscape.js/issues/803
标签: cytoscape.js
【问题讨论】:
标签: cytoscape.js
您可以使用layout 选项。如果这还不够,如果您想请求新功能或选项,请file a feature request。
【讨论】:
在您的 layout 选项中使用 nodeSep 属性
例如:
var cy = window.cy = cytoscape({
container: document.getElementById('cy'),
layout: {
stop: function () {
cy.automove({
nodesMatching: cy.$(':parent *'),
reposition: 'drag',
dragWith: cy.$(':parent *')
});
},
name: 'cose-bilkent',
animate: 'end',
nodeSep: 20, // >>>>>>YOUR TARGET PROPERTY<<<<<<<
animationEasing: 'ease-out',
animationDuration: 2000
}});
【讨论】: