mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-17 14:29:48 +02:00
MC-1730 Fix for id handling in elk
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@mermaid-chart/layout-elk",
|
"name": "@mermaid-chart/layout-elk",
|
||||||
"version": "0.0.15",
|
"version": "0.0.16",
|
||||||
"description": "ELK layout engine for mermaid",
|
"description": "ELK layout engine for mermaid",
|
||||||
"module": "dist/mermaid-layout-elk.core.mjs",
|
"module": "dist/mermaid-layout-elk.core.mjs",
|
||||||
"types": "dist/packages/mermaid-layout-elk/src/index.d.ts",
|
"types": "dist/packages/mermaid-layout-elk/src/index.d.ts",
|
||||||
|
@@ -280,7 +280,7 @@ export const addEdges = async function (dataForLayout, graph, svg) {
|
|||||||
|
|
||||||
await Promise.all(
|
await Promise.all(
|
||||||
edges.map(async function (edge) {
|
edges.map(async function (edge) {
|
||||||
|
let linkId = edge.id;
|
||||||
if (!edge.id) {
|
if (!edge.id) {
|
||||||
// Identify Link
|
// Identify Link
|
||||||
const linkIdBase = edge.id; // 'L-' + edge.start + '-' + edge.end;
|
const linkIdBase = edge.id; // 'L-' + edge.start + '-' + edge.end;
|
||||||
@@ -294,9 +294,9 @@ export const addEdges = async function (dataForLayout, graph, svg) {
|
|||||||
}
|
}
|
||||||
const linkId = linkIdBase + '_' + linkIdCnt[linkIdBase];
|
const linkId = linkIdBase + '_' + linkIdCnt[linkIdBase];
|
||||||
edge.id = linkId;
|
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 linkNameStart = 'LS_' + edge.start;
|
||||||
const linkNameEnd = 'LE_' + edge.end;
|
const linkNameEnd = 'LE_' + edge.end;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user