Closed SueCheng closed 5 years ago
Hi @SueCheng 👋
Good question, I see what you mean. I've got a couple of suggestions to do so:
-s
option? Is it producing something usable to you? physics: { enabled: false }
to the options
objectLet me know if you manage to get a more helpful result for you.
Closing the issue. Feel free to re-open it if you need further details.
Thanks @nicoespeon for this!
My company's project has hundreds of imports as it's shared across projects and also uses Bootstrap.
The default setup does not play well when wanting to keep import references across projects and libraries.
If you follow @nicoespeon advice above and replace it with the below options I've set, you can get something a little more tidier and readable. It goes from left to right which works better for long import paths.
var options = {
autoResize: true,
height: '100%',
width: '100%',
edges: {
arrows: 'to',
smooth: {
type: "cubicBezier",
roundness: 1
}
},
nodes: {
font: {
align: 'left'
},
shape: 'box'
},
layout: {
hierarchical: {
levelSeparation: 800,
treeSpacing: 300,
blockShifting: true,
edgeMinimization: true,
parentCentralization: true,
direction: 'LR',
nodeSpacing: 15,
sortMethod: "directed"
}
}
};
That's amazing, thank you @kerryj89 for sharing ❤️
Good work!, yet there are some overlapping of file nodes on the tree? tried to pull aways, but bounce back to overlap