Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kie-issues#1718: DMN Editor extension generates SVG with missing font color #2816

Merged
merged 2 commits into from
Dec 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions packages/dmn-editor/src/diagram/nodes/NodeStyle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ export interface DmnFontStyle {
family?: string;
size?: number;
color: string;
fill: string;
}

export interface Color {
Expand Down Expand Up @@ -169,6 +170,7 @@ export function getDmnFontStyle(args: {
family: args.isEnabled ? args.dmnStyle?.["@_fontFamily"] : undefined,
size: args.isEnabled ? args.dmnStyle?.["@_fontSize"] : undefined,
color: fontColor,
fill: fontColor,
};
}

Expand All @@ -189,6 +191,7 @@ export function getFontCssProperties(dmnFontStyle?: DmnFontStyle): React.CSSProp
textDecoration,
fontSize: dmnFontStyle?.size ?? "16px",
color: dmnFontStyle?.color ?? "black",
fill: dmnFontStyle?.fill ?? "black",
lineHeight: "1.5em", // This needs to be em `em` otherwise `@visx/text` breaks when generating the SVG.
};
}
Expand Down
Loading