mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-04 16:16:41 +02:00
#1295 Fix for intersection calculation for edges to clusters and adding concurrency in stateDiagrams as clusters
This commit is contained in:
16
src/utils.js
16
src/utils.js
@@ -210,6 +210,19 @@ export const getStylesFromArray = arr => {
|
||||
return { style: style, labelStyle: labelStyle };
|
||||
};
|
||||
|
||||
let cnt = 0;
|
||||
export const generateId = () => {
|
||||
cnt++;
|
||||
return (
|
||||
'id-' +
|
||||
Math.random()
|
||||
.toString(36)
|
||||
.substr(2, 12) +
|
||||
'-' +
|
||||
cnt
|
||||
);
|
||||
};
|
||||
|
||||
export default {
|
||||
detectType,
|
||||
isSubstringInArray,
|
||||
@@ -217,5 +230,6 @@ export default {
|
||||
calcLabelPosition,
|
||||
calcCardinalityPosition,
|
||||
formatUrl,
|
||||
getStylesFromArray
|
||||
getStylesFromArray,
|
||||
generateId
|
||||
};
|
||||
|
Reference in New Issue
Block a user