mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-11-14 17:54:13 +01:00
Change cssClasses to use concatenated string instead of array to pick up css styles
This commit is contained in:
@@ -88,7 +88,7 @@ export const addClass = function (_id: string) {
|
|||||||
label: name,
|
label: name,
|
||||||
text: `${name}${type ? `<${type}>` : ''}`,
|
text: `${name}${type ? `<${type}>` : ''}`,
|
||||||
shape: 'classBox',
|
shape: 'classBox',
|
||||||
cssClasses: ['default'],
|
cssClasses: 'default',
|
||||||
methods: [],
|
methods: [],
|
||||||
members: [],
|
members: [],
|
||||||
annotations: [],
|
annotations: [],
|
||||||
@@ -279,7 +279,7 @@ export const setCssClass = function (ids: string, className: string) {
|
|||||||
}
|
}
|
||||||
const classNode = classes.get(id);
|
const classNode = classes.get(id);
|
||||||
if (classNode) {
|
if (classNode) {
|
||||||
classNode.cssClasses.push(className);
|
classNode.cssClasses += ' ' + className;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ export interface ClassNode {
|
|||||||
label: string;
|
label: string;
|
||||||
shape: string;
|
shape: string;
|
||||||
text: string;
|
text: string;
|
||||||
cssClasses: string[];
|
cssClasses: string;
|
||||||
methods: ClassMember[];
|
methods: ClassMember[];
|
||||||
members: ClassMember[];
|
members: ClassMember[];
|
||||||
annotations: string[];
|
annotations: string[];
|
||||||
|
|||||||
Reference in New Issue
Block a user