mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-01-28 07:03:17 +08:00
#5237 Fix for issue with styling using new rendering flow
This commit is contained in:
parent
97be6cbd73
commit
9b56cb3feb
@ -220,7 +220,7 @@ export const addClass = function (ids: string, style: string[]) {
|
||||
if (style !== undefined && style !== null) {
|
||||
style.forEach(function (s) {
|
||||
if (s.match('color')) {
|
||||
const newStyle = s.replace('fill', 'bgFill').replace('color', 'fill');
|
||||
const newStyle = s.replace('fill', 'bgFill'); // .replace('color', 'fill');
|
||||
classNode.textStyles.push(newStyle);
|
||||
}
|
||||
classNode.styles.push(s);
|
||||
@ -829,6 +829,7 @@ function getCompiledStyles(classDefs: string[]) {
|
||||
let compiledStyles: string[] = [];
|
||||
for (const customClass of classDefs) {
|
||||
const cssClass = classes.get(customClass);
|
||||
log.debug('IPI cssClass in flowDb', cssClass);
|
||||
if (cssClass) {
|
||||
if (cssClass.styles) {
|
||||
compiledStyles = [...compiledStyles, ...(cssClass.styles ?? [])].map((s) => s.trim());
|
||||
|
Loading…
x
Reference in New Issue
Block a user