mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-18 14:59:53 +02:00
Merge pull request #21 from Mermaid-Chart/fix/classBox-neo-default
Fix invisible divider lines on classBox when using neo-default
This commit is contained in:
@@ -12,6 +12,9 @@ import type { D3Selection } from '../../../types.js';
|
||||
|
||||
export async function classBox<T extends SVGGraphicsElement>(parent: D3Selection<T>, node: Node) {
|
||||
const config = getConfig();
|
||||
const { themeVariables } = config;
|
||||
const { useGradient } = themeVariables;
|
||||
|
||||
const PADDING = config.class!.padding ?? 12;
|
||||
const GAP = PADDING;
|
||||
const useHtmlLabels = node.useHtmlLabels ?? evaluate(config.htmlLabels) ?? true;
|
||||
@@ -199,7 +202,9 @@ export async function classBox<T extends SVGGraphicsElement>(parent: D3Selection
|
||||
options
|
||||
);
|
||||
const line = shapeSvg.insert(() => roughLine);
|
||||
line.attr('class', 'divider').attr('style', styles);
|
||||
line
|
||||
.attr('class', `divider${node.look === 'neo' && !useGradient ? ' neo-line' : ''}`)
|
||||
.attr('style', styles);
|
||||
}
|
||||
|
||||
// Second line (under members)
|
||||
@@ -214,7 +219,9 @@ export async function classBox<T extends SVGGraphicsElement>(parent: D3Selection
|
||||
options
|
||||
);
|
||||
const line = shapeSvg.insert(() => roughLine);
|
||||
line.attr('class', 'divider').attr('style', styles);
|
||||
line
|
||||
.attr('class', `divider${node.look === 'neo' && !useGradient ? ' neo-line' : ''}`)
|
||||
.attr('style', styles);
|
||||
}
|
||||
|
||||
/// Apply styles ///
|
||||
|
Reference in New Issue
Block a user