mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-21 08:19:43 +02:00
#1143 Adding support in grammar for multiple nodes in dependency declarations
This commit is contained in:
@@ -102,7 +102,7 @@ export const addVertex = function(_id, text, type, style, classes) {
|
||||
* @param type
|
||||
* @param linktext
|
||||
*/
|
||||
export const addLink = function(_start, _end, type, linktext) {
|
||||
export const addSingleLink = function(_start, _end, type, linktext) {
|
||||
let start = _start;
|
||||
let end = _end;
|
||||
if (start[0].match(/\d/)) start = MERMAID_DOM_ID_PREFIX + start;
|
||||
@@ -127,6 +127,14 @@ export const addLink = function(_start, _end, type, linktext) {
|
||||
}
|
||||
edges.push(edge);
|
||||
};
|
||||
export const addLink = function(_start, _end, type, linktext) {
|
||||
let i, j;
|
||||
for (i = 0; i < _start.length; i++) {
|
||||
for (j = 0; j < _end.length; j++) {
|
||||
addSingleLink(_start[i], _end[j], type, linktext);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Updates a link's line interpolation algorithm
|
||||
@@ -490,6 +498,7 @@ export const indexNodes = function() {
|
||||
};
|
||||
|
||||
export const getSubGraphs = function() {
|
||||
console.warn(subGraphs);
|
||||
return subGraphs;
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user