This commit is contained in:
Sidharth Vinod
2024-01-29 12:35:39 +05:30
parent d21461fba0
commit 4c551b2aca
2 changed files with 8 additions and 16 deletions

View File

@@ -1,4 +1,4 @@
import { RequiredDeep } from 'type-fest'; import type { RequiredDeep } from 'type-fest';
import type mindmapDb from './mindmapDb.js'; import type mindmapDb from './mindmapDb.js';
export interface MindmapNode { export interface MindmapNode {

View File

@@ -1,8 +1,8 @@
import type { D3Element } from '../../mermaidAPI.js'; import type { D3Element } from '../../mermaidAPI.js';
import { createText } from '../../rendering-util/createText.js'; import { createText } from '../../rendering-util/createText.js';
import type { FilledMindMapNode, MindmapDB } from './mindmapTypes.js'; import type { FilledMindMapNode, MindmapDB } from './mindmapTypes.js';
import { MermaidConfigWithDefaults } from '../../config.js'; import type { MermaidConfigWithDefaults } from '../../config.js';
import { Point } from '../../types.js'; import type { Point } from '../../types.js';
const MAX_SECTIONS = 12; const MAX_SECTIONS = 12;
type ShapeFunction = ( type ShapeFunction = (
@@ -114,14 +114,6 @@ const circleBkg: ShapeFunction = function (db, elem, node) {
.attr('r', node.width / 2); .attr('r', node.width / 2);
}; };
/**
*
* @param parent
* @param w
* @param h
* @param points
* @param node
*/
function insertPolygonShape( function insertPolygonShape(
parent: D3Element, parent: D3Element,
w: number, w: number,
@@ -174,11 +166,11 @@ const roundedRectBkg: ShapeFunction = function (db, elem, node) {
}; };
/** /**
* @param db The database * @param db - The database
* @param elem The D3 dom element in which the node is to be added * @param elem - The D3 dom element in which the node is to be added
* @param node The node to be added * @param node - The node to be added
* @param fullSection * @param fullSection - ?
* @param conf The configuration object * @param conf - The configuration object
* @returns The height nodes dom element * @returns The height nodes dom element
*/ */
export const drawNode = function ( export const drawNode = function (