mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-25 10:20:06 +02:00
Merge pull request #1171 from mermaid-js/feature/Issue-1146_Dashed_Line_For_Class_Diagram
Feature/issue 1146 dashed line for class diagram
This commit is contained in:
@@ -310,6 +310,16 @@ describe('class diagram, ', function () {
|
||||
|
||||
parser.parse(str);
|
||||
});
|
||||
it('should handle dashed relation definition of different types and directions', function () {
|
||||
const str =
|
||||
'classDiagram\n' +
|
||||
'Class11 <|.. Class12\n' +
|
||||
'Class13 <.. Class14\n' +
|
||||
'Class15 ..|> Class16\n' +
|
||||
'Class17 ..> Class18\n' +
|
||||
'Class19 .. Class20';
|
||||
parser.parse(str);
|
||||
});
|
||||
});
|
||||
|
||||
describe('when fetching data from a classDiagram graph it', function () {
|
||||
|
@@ -183,6 +183,9 @@ const drawEdge = function(elem, path, relation) {
|
||||
url = url.replace(/\)/g, '\\)');
|
||||
}
|
||||
|
||||
if (relation.relation.lineType == 1) {
|
||||
svgPath.attr('class', 'relation dashed-line');
|
||||
}
|
||||
if (relation.relation.type1 !== 'none') {
|
||||
svgPath.attr(
|
||||
'marker-start',
|
||||
|
Reference in New Issue
Block a user