提交 142fe4c0 authored 作者: 王鹏飞's avatar 王鹏飞

chore: update

上级 ce1e6cf0
......@@ -22,14 +22,14 @@ export function useLayout(findNode) {
dagreGraph.setDefaultEdgeLabel(() => ({}))
const isHorizontal = direction === 'LR'
dagreGraph.setGraph({ rankdir: direction, ranksep: 160 })
dagreGraph.setGraph({ rankdir: direction, ranksep: 120 })
previousDirection.value = direction
for (const node of nodes) {
// if you need width+height of nodes for your layout, you can use the dimensions property of the internal node (`GraphNode` type)
const graphNode = findNode(node.id)
dagreGraph.setNode(node.id, { width: graphNode.dimensions.width || 182, height: graphNode.dimensions.height || 162 })
dagreGraph.setNode(node.id, { width: graphNode.dimensions.width || 180, height: graphNode.dimensions.height || 160 })
}
for (const edge of edges) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论