Skip to content

Commit

Permalink
Fix (tmp) for handling of config of htmlLabels ion note. MOvint class…
Browse files Browse the repository at this point in the history
… box out of flowchart docs
  • Loading branch information
knsv committed Oct 30, 2024
1 parent 953d288 commit c1ca351
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
15 changes: 6 additions & 9 deletions packages/mermaid/src/rendering-util/rendering-elements/shapes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -449,14 +449,6 @@ export const shapesDefs = [
aliases: ['lined-document'],
handler: linedWaveEdgedRect,
},
{
semanticName: 'Class Box',
name: 'Class Box',
shortName: 'classBox',
description: 'Class Box',
aliases: ['class-box'],
handler: classBox,
},
] as const satisfies ShapeDefinition[];

const generateShapeMap = () => {
Expand All @@ -477,8 +469,13 @@ const generateShapeMap = () => {
icon,
iconRounded,
imageSquare,
kanbanItem,
anchor,

// Kanban diagram
kanbanItem,

// class diagram
classBox,
} as const;

const entries = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export async function note<T extends SVGGraphicsElement>(
) {
const { labelStyles, nodeStyles } = styles2String(node);
node.labelStyle = labelStyles;
const useHtmlLabels = node.useHtmlLabels || getConfig().htmlLabels;
const useHtmlLabels = node.useHtmlLabels || getConfig().flowchart?.htmlLabels !== false;
if (!useHtmlLabels) {
node.centerLabel = true;
}
Expand Down

0 comments on commit c1ca351

Please sign in to comment.