mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-14 12:59:46 +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>(
|
export function filledCircle<T extends SVGGraphicsElement>(
|
||||||
parent: D3Selection<T>,
|
parent: D3Selection<T>,
|
||||||
node: Node,
|
node: Node,
|
||||||
{ config: { themeVariables } }: ShapeRenderOptions
|
{ config: { themeVariables, theme } }: ShapeRenderOptions
|
||||||
) {
|
) {
|
||||||
node.label = '';
|
node.label = '';
|
||||||
|
|
||||||
@@ -61,7 +61,7 @@ export function filledCircle<T extends SVGGraphicsElement>(
|
|||||||
filledCircle.attr('class', 'outer-path');
|
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)');
|
filledCircle.attr('style', 'filter:url(#drop-shadow-small)');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -8,7 +8,7 @@ import type { D3Selection } from '../../../types.js';
|
|||||||
export function stateEnd<T extends SVGGraphicsElement>(
|
export function stateEnd<T extends SVGGraphicsElement>(
|
||||||
parent: D3Selection<T>,
|
parent: D3Selection<T>,
|
||||||
node: Node,
|
node: Node,
|
||||||
{ config: { themeVariables } }: ShapeRenderOptions
|
{ config: { themeVariables, theme } }: ShapeRenderOptions
|
||||||
) {
|
) {
|
||||||
const { labelStyles, nodeStyles } = styles2String(node);
|
const { labelStyles, nodeStyles } = styles2String(node);
|
||||||
node.labelStyle = labelStyles;
|
node.labelStyle = labelStyles;
|
||||||
@@ -80,7 +80,7 @@ export function stateEnd<T extends SVGGraphicsElement>(
|
|||||||
circle.selectAll('path').attr('style', nodeStyles);
|
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)');
|
circle.attr('style', 'filter:url(#drop-shadow-small)');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -8,7 +8,7 @@ import type { D3Selection } from '../../../types.js';
|
|||||||
export function stateStart<T extends SVGGraphicsElement>(
|
export function stateStart<T extends SVGGraphicsElement>(
|
||||||
parent: D3Selection<T>,
|
parent: D3Selection<T>,
|
||||||
node: Node,
|
node: Node,
|
||||||
{ config: { themeVariables } }: ShapeRenderOptions
|
{ config: { themeVariables, theme } }: ShapeRenderOptions
|
||||||
) {
|
) {
|
||||||
const { lineColor } = themeVariables;
|
const { lineColor } = themeVariables;
|
||||||
|
|
||||||
@@ -62,7 +62,7 @@ export function stateStart<T extends SVGGraphicsElement>(
|
|||||||
.attr('height', node.height ?? 14);
|
.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)');
|
circle.attr('style', 'filter:url(#drop-shadow-small)');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user