mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-08-22 09:46:42 +02:00
Restore classes on edges for elk
This commit is contained in:
@@ -684,6 +684,20 @@ A --> B
|
|||||||
{ titleTopMargin: 0 }
|
{ titleTopMargin: 0 }
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
it('elk: should include classes on the edges', () => {
|
||||||
|
renderGraph(
|
||||||
|
`flowchart-elk TD
|
||||||
|
A --> B --> C --> D
|
||||||
|
`,
|
||||||
|
{}
|
||||||
|
);
|
||||||
|
cy.get('svg').should((svg) => {
|
||||||
|
const edges = svg.querySelectorAll('.edges > path');
|
||||||
|
edges.forEach((edge) => {
|
||||||
|
expect(edge).to.have.class('flowchart-link');
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
describe('Markdown strings flowchart-elk (#4220)', () => {
|
describe('Markdown strings flowchart-elk (#4220)', () => {
|
||||||
describe('html labels', () => {
|
describe('html labels', () => {
|
||||||
it('With styling and classes', () => {
|
it('With styling and classes', () => {
|
||||||
|
@@ -717,7 +717,7 @@ const insertEdge = function (edgesEl, edge, edgeData, diagObj, parentLookupDb) {
|
|||||||
const edgePath = edgesEl
|
const edgePath = edgesEl
|
||||||
.insert('path')
|
.insert('path')
|
||||||
.attr('d', curve(points))
|
.attr('d', curve(points))
|
||||||
.attr('class', 'path')
|
.attr('class', 'path ' + edgeData.classes)
|
||||||
.attr('fill', 'none');
|
.attr('fill', 'none');
|
||||||
const edgeG = edgesEl.insert('g').attr('class', 'edgeLabel');
|
const edgeG = edgesEl.insert('g').attr('class', 'edgeLabel');
|
||||||
const edgeWithLabel = select(edgeG.node().appendChild(edge.labelEl));
|
const edgeWithLabel = select(edgeG.node().appendChild(edge.labelEl));
|
||||||
|
Reference in New Issue
Block a user