Removing hard coding with dynamic values for cardinalities

This commit is contained in:
Ashish Jain
2020-08-13 19:41:33 +02:00
parent 9891b383e7
commit 36f8f1902c
2 changed files with 8 additions and 5 deletions

View File

@@ -50,6 +50,10 @@
classA -- classC : link
classC -- classD : link
classB -- classD
Customer "1" --> "*" Ticket
Student "1" --> "1..*" Course
Galaxy --> "many" Star : Contains
</div>
<script src="./mermaid.js"></script>
<script>

View File

@@ -155,12 +155,11 @@ export const addRelations = function(relations, g) {
}
logger.info(edgeData, edge);
//Set edge extra labels
edgeData.startLabelLeft = 'TL';
edgeData.startLabelRight = 'TR';
edgeData.endLabelLeft = 'BL';
edgeData.endLabelRight = 'BR';
//edgeData.startLabelLeft = edge.relationTitle1;
edgeData.startLabelRight = edge.relationTitle1 === 'none' ? '' : edge.relationTitle1;
edgeData.endLabelLeft = edge.relationTitle2 === 'none' ? '' : edge.relationTitle2;
//edgeData.endLabelRight = edge.relationTitle2;
//Set relation arrow types
edgeData.arrowTypeStart = getArrowMarker(edge.relation.type1);