refactor: remove unused param from labelHelper()

Fixes: 7401cb8f6aec0c7dccae820824eb2bb3e6a3e12d
This commit is contained in:
Alois Klink 2024-10-29 21:12:11 +09:00
parent 8d0902de4c
commit 054f929150

View File

@ -10,8 +10,7 @@ import type { D3Selection, Point } from '../../../types.js';
export const labelHelper = async <T extends SVGGraphicsElement>( export const labelHelper = async <T extends SVGGraphicsElement>(
parent: D3Selection<T>, parent: D3Selection<T>,
node: Node, node: Node,
_classes?: string, _classes?: string
_shapeSvg?: D3Selection<T>
) => { ) => {
let cssClasses; let cssClasses;
const useHtmlLabels = node.useHtmlLabels || evaluate(getConfig()?.flowchart?.htmlLabels); const useHtmlLabels = node.useHtmlLabels || evaluate(getConfig()?.flowchart?.htmlLabels);
@ -22,12 +21,10 @@ export const labelHelper = async <T extends SVGGraphicsElement>(
} }
// Add outer g element // Add outer g element
const shapeSvg = _shapeSvg const shapeSvg = parent
? _shapeSvg .insert('g')
: parent .attr('class', cssClasses)
.insert('g') .attr('id', node.domId || node.id);
.attr('class', cssClasses)
.attr('id', node.domId || node.id);
// Create the label and insert it after the rect // Create the label and insert it after the rect
const labelEl = shapeSvg const labelEl = shapeSvg