mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-08-19 00:06:47 +02:00
Update packages/mermaid/src/diagrams/class/classDb.ts
Co-authored-by: Sidharth Vinod <sidharthv96@gmail.com>
This commit is contained in:
@@ -457,20 +457,16 @@ export const addClassesToNamespace = function (id: string, classNames: string[])
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
export const setCssStyle = function (id: string, style: string[]) {
|
export const setCssStyle = function (id: string, styles: string[]) {
|
||||||
if (style !== undefined && style !== null) {
|
const thisClass = classes[id];
|
||||||
const thisClass = classes[id];
|
if (!styles || !thisClass) {
|
||||||
if (thisClass !== undefined) {
|
return;
|
||||||
style.forEach(function (s) {
|
}
|
||||||
if (s.includes(',')) {
|
for (const s of styles) {
|
||||||
const styles = s.split(',');
|
if (s.includes(',')) {
|
||||||
styles.forEach(function (newStyle) {
|
thisClass.styles = thisClass.styles.concat(s.split(','));
|
||||||
thisClass.styles.push(newStyle);
|
} else {
|
||||||
});
|
thisClass.styles.push(s);
|
||||||
} else {
|
|
||||||
thisClass.styles.push(s);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user