Skip to content

Commit

Permalink
feat: link label
Browse files Browse the repository at this point in the history
  • Loading branch information
alswl committed May 3, 2024
1 parent 5a1a716 commit d35cb15
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion src/parser/parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,26 @@ function parseRef(ref: Ref): any {
cell: `${tSchemaName}-${target.tableName}`,
port: `${tSchemaName}-${target.tableName}-${targetFieldName}`,
},
// text: `${sourceFieldName} -> ${targetFieldName}`,
labels: [
{
attrs: {
label: {
text: source.relation,
stroke: '#aaa',
},
},
position: 0.2,
},
{
attrs: {
label: {
text: target.relation,
stroke: '#aaa',
},
},
position: 0.8,
},
],
};
return edge;
}
Expand Down

0 comments on commit d35cb15

Please sign in to comment.