#5237 Fix for issue with styling using new rendering flow

This commit is contained in:
Knut Sveidqvist 2024-06-24 14:17:56 +02:00
parent 97be6cbd73
commit 9b56cb3feb

View File

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