mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-16 22:09:57 +02:00
MC-1730 Fix for id handling in elk
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@mermaid-chart/layout-elk",
|
||||
"version": "0.0.15",
|
||||
"version": "0.0.16",
|
||||
"description": "ELK layout engine for mermaid",
|
||||
"module": "dist/mermaid-layout-elk.core.mjs",
|
||||
"types": "dist/packages/mermaid-layout-elk/src/index.d.ts",
|
||||
|
@@ -280,9 +280,9 @@ export const addEdges = async function (dataForLayout, graph, svg) {
|
||||
|
||||
await Promise.all(
|
||||
edges.map(async function (edge) {
|
||||
|
||||
let linkId = edge.id;
|
||||
if (!edge.id) {
|
||||
// Identify Link
|
||||
// Identify Link
|
||||
const linkIdBase = edge.id; // 'L-' + edge.start + '-' + edge.end;
|
||||
// count the links from+to the same node to give unique id
|
||||
if (linkIdCnt[linkIdBase] === undefined) {
|
||||
@@ -294,9 +294,9 @@ export const addEdges = async function (dataForLayout, graph, svg) {
|
||||
}
|
||||
const linkId = linkIdBase + '_' + linkIdCnt[linkIdBase];
|
||||
edge.id = linkId;
|
||||
// log.info('abc78 new link id to be used is', linkIdBase, linkId, linkIdCnt[linkIdBase]);
|
||||
}
|
||||
|
||||
log.info('abc78 new link id to be used is', linkIdBase, linkId, linkIdCnt[linkIdBase]);
|
||||
|
||||
const linkNameStart = 'LS_' + edge.start;
|
||||
const linkNameEnd = 'LE_' + edge.end;
|
||||
|
||||
|
Reference in New Issue
Block a user