mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-19 07:19:41 +02:00
Cleanup
This commit is contained in:
@@ -135,10 +135,10 @@ export const getData = function () {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let cnt = 0;
|
let count = 0;
|
||||||
for (const relationship of relationships) {
|
for (const relationship of relationships) {
|
||||||
const edge: Edge = {
|
const edge: Edge = {
|
||||||
id: getEdgeId(relationship.entityA, relationship.entityB, { prefix: 'id', counter: cnt++ }),
|
id: getEdgeId(relationship.entityA, relationship.entityB, { prefix: 'id', counter: count++ }),
|
||||||
type: 'normal',
|
type: 'normal',
|
||||||
start: relationship.entityA,
|
start: relationship.entityA,
|
||||||
end: relationship.entityB,
|
end: relationship.entityB,
|
||||||
@@ -179,7 +179,7 @@ export const addClass = function (ids: string[], style: string[]) {
|
|||||||
if (style) {
|
if (style) {
|
||||||
style.forEach(function (s) {
|
style.forEach(function (s) {
|
||||||
if (/color/.exec(s)) {
|
if (/color/.exec(s)) {
|
||||||
const newStyle = s.replace('fill', 'bgFill'); // .replace('color', 'fill');
|
const newStyle = s.replace('fill', 'bgFill');
|
||||||
classNode.textStyles.push(newStyle);
|
classNode.textStyles.push(newStyle);
|
||||||
}
|
}
|
||||||
classNode.styles.push(s);
|
classNode.styles.push(s);
|
||||||
|
Reference in New Issue
Block a user