Skip to content

Commit

Permalink
kie-issues#1718: DMN Editor extension generates SVG with missing font…
Browse files Browse the repository at this point in the history
… color (apache#2816)

Co-authored-by: chinnamatli kusumalatha <[email protected]>
  • Loading branch information
Kusuma04-dev and chinnamatli kusumalatha authored Dec 17, 2024
1 parent c28f619 commit d80fa2b
Showing 1 changed file with 3 additions and 0 deletions.
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

0 comments on commit d80fa2b

Please sign in to comment.