packages/mermaid/src/diagrams/class/classRenderer-v2.ts
File classRenderer-v2.ts
has 291 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
// @ts-nocheck - don't check until handle it
import { select, curveLinear } from 'd3';
import * as graphlib from 'dagre-d3-es/src/graphlib/index.js';
import { log } from '../../logger.js';
import { getConfig } from '../../diagram-api/diagramAPI.js';
Function draw
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const draw = async function (text: string, id: string, _version: string, diagObj: any) {
log.info('Drawing class - ', id);
// TODO V10: Why flowchart? Might be a mistake when copying.
const conf = getConfig().flowchart ?? getConfig().class;
Function addRelations
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const addRelations = function (relations: ClassRelation[], g: graphlib.Graph) {
const conf = getConfig().flowchart;
let cnt = 0;
relations.forEach(function (edge) {
Function addNotes
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const addNotes = function (
notes: ClassNote[],
g: graphlib.Graph,
startEdgeId: number,
classes: ClassMap
Function addClasses
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const addClasses = function (
classes: ClassMap,
g: graphlib.Graph,
_id: string,
diagObj: any,
Function addClasses
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
classes: ClassMap,
g: graphlib.Graph,
_id: string,
diagObj: any,
parent?: string