mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-08-30 21:56:43 +02:00
Add suport for start and end labels (cardinality) in elk renderer
This commit is contained in:
@@ -262,6 +262,8 @@ export const render = async (
|
|||||||
interpolate: undefined;
|
interpolate: undefined;
|
||||||
style: undefined;
|
style: undefined;
|
||||||
labelType: any;
|
labelType: any;
|
||||||
|
startLabelRight?: string;
|
||||||
|
endLabelLeft?: string;
|
||||||
}) {
|
}) {
|
||||||
// Identify Link
|
// Identify Link
|
||||||
const linkIdBase = edge.id; // 'L-' + edge.start + '-' + edge.end;
|
const linkIdBase = edge.id; // 'L-' + edge.start + '-' + edge.end;
|
||||||
@@ -315,6 +317,9 @@ export const render = async (
|
|||||||
let style = '';
|
let style = '';
|
||||||
let labelStyle = '';
|
let labelStyle = '';
|
||||||
|
|
||||||
|
edgeData.startLabelRight = edge.startLabelRight;
|
||||||
|
edgeData.endLabelLeft = edge.endLabelLeft;
|
||||||
|
|
||||||
switch (edge.stroke) {
|
switch (edge.stroke) {
|
||||||
case 'normal':
|
case 'normal':
|
||||||
style = 'fill:none;';
|
style = 'fill:none;';
|
||||||
|
Reference in New Issue
Block a user