Resolved the issue where the drop-shadow was being applied to themes other than Redux.

This commit is contained in:
omkarht
2025-01-24 15:20:38 +05:30
parent f7772b440d
commit f785b47b1d
3 changed files with 6 additions and 6 deletions

View File

@@ -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)');
}

View File

@@ -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)');
}

View File

@@ -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)');
}