mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-13 12:29:42 +02:00
Resolved the issue where the drop-shadow was being applied to themes other than Redux.
This commit is contained in:
@@ -9,7 +9,7 @@ import type { D3Selection } from '../../../types.js';
|
||||
export function filledCircle<T extends SVGGraphicsElement>(
|
||||
parent: D3Selection<T>,
|
||||
node: Node,
|
||||
{ config: { themeVariables } }: ShapeRenderOptions
|
||||
{ config: { themeVariables, theme } }: ShapeRenderOptions
|
||||
) {
|
||||
node.label = '';
|
||||
|
||||
@@ -61,7 +61,7 @@ export function filledCircle<T extends SVGGraphicsElement>(
|
||||
filledCircle.attr('class', 'outer-path');
|
||||
}
|
||||
|
||||
if (node.width < 25) {
|
||||
if (node.width < 25 && theme === 'redux' && node.look !== 'handDrawn') {
|
||||
filledCircle.attr('style', 'filter:url(#drop-shadow-small)');
|
||||
}
|
||||
|
||||
|
@@ -8,7 +8,7 @@ import type { D3Selection } from '../../../types.js';
|
||||
export function stateEnd<T extends SVGGraphicsElement>(
|
||||
parent: D3Selection<T>,
|
||||
node: Node,
|
||||
{ config: { themeVariables } }: ShapeRenderOptions
|
||||
{ config: { themeVariables, theme } }: ShapeRenderOptions
|
||||
) {
|
||||
const { labelStyles, nodeStyles } = styles2String(node);
|
||||
node.labelStyle = labelStyles;
|
||||
@@ -80,7 +80,7 @@ export function stateEnd<T extends SVGGraphicsElement>(
|
||||
circle.selectAll('path').attr('style', nodeStyles);
|
||||
}
|
||||
|
||||
if (node.width < 25) {
|
||||
if (node.width < 25 && theme === 'redux' && node.look !== 'handDrawn') {
|
||||
circle.attr('style', 'filter:url(#drop-shadow-small)');
|
||||
}
|
||||
|
||||
|
@@ -8,7 +8,7 @@ import type { D3Selection } from '../../../types.js';
|
||||
export function stateStart<T extends SVGGraphicsElement>(
|
||||
parent: D3Selection<T>,
|
||||
node: Node,
|
||||
{ config: { themeVariables } }: ShapeRenderOptions
|
||||
{ config: { themeVariables, theme } }: ShapeRenderOptions
|
||||
) {
|
||||
const { lineColor } = themeVariables;
|
||||
|
||||
@@ -62,7 +62,7 @@ export function stateStart<T extends SVGGraphicsElement>(
|
||||
.attr('height', node.height ?? 14);
|
||||
}
|
||||
|
||||
if (node.width < 25) {
|
||||
if (node.width < 25 && theme === 'redux' && node.look !== 'handDrawn') {
|
||||
circle.attr('style', 'filter:url(#drop-shadow-small)');
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user