Change cssClasses to use concatenated string instead of array to pick up css styles

This commit is contained in:
yari-dewalt
2024-10-18 10:33:56 -07:00
parent 10f11e016f
commit 0e819ae050
2 changed files with 3 additions and 3 deletions

View File

@@ -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;
} }
}); });
}; };

View File

@@ -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[];