Skip to content

Commit

Permalink
🐛 fix(common): fix label size issue in default cfg
Browse files Browse the repository at this point in the history
  • Loading branch information
萌萌的老胖子 committed Jun 3, 2020
1 parent 5f56307 commit 06cc99e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/graphin/src/controller/layout/dataChecker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ function makePolyEdge(edges: Data['edges'], data: Data, options: CheckerOption)

if (!source || !target) throw new Error('Invalid Edge, Cannot Find Source/Target Node');

if (isEven(group.length) && isEven(index)) distance += 40;
if (isOdd(group.length) && (isOdd(index) || index === 0)) distance += 40;
if (isEven(group.length) && isEven(index)) distance += 20;
if (isOdd(group.length) && (isOdd(index) || index === 0)) distance += 20;
const polyEdge = {
...edge,
shape: 'PolyEdge',
Expand Down Expand Up @@ -107,7 +107,7 @@ function checkEdges(edges: Data['edges'], data: Data, options: CheckerOption) {
width: 1,
},
label: {
size: 1,
size: 12,
},
},
poly: {
Expand Down
1 change: 1 addition & 0 deletions packages/graphin/src/utils/mock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ export class Mock {
this.edges.push({
source: node.parent && node.parent.id,
target: node.id,
label: `edge-${node.parent && node.parent.id}_${node.id}`,
properties: [],
});
}
Expand Down

0 comments on commit 06cc99e

Please sign in to comment.