Showing 384 of 1,490 total issues
Function addRel
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const addRel = function (type, from, to, label, techn, descr, sprite, tags, link) {
// Don't allow label nulling
if (
type === undefined ||
type === null ||
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 getBorders
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
getBorders(spaceData: CalculateSpaceData): QuadrantLineType[] {
const halfExternalBorderWidth = this.config.quadrantExternalBorderStrokeWidth / 2;
const { quadrantSpace } = spaceData;
const {
File flowRenderer.spec.js
has 267 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import { addVertices, addEdges } from './flowRenderer.js';
import { setConfig } from '../../diagram-api/diagramAPI.js';
setConfig({
flowchart: {
Function draw
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const draw = async function (text, id, _version, diag) {
log.info('Drawing state diagram (v2)', id);
nodeDb = {};
// Fetch the default direction, use TD if none was found
let dir = diag.db.getDirection();
Function buildMessageModel
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const buildMessageModel = function (msg, actors, diagObj) {
if (
![
diagObj.db.LINETYPE.SOLID_OPEN,
diagObj.db.LINETYPE.DOTTED_OPEN,
File flowChartShapes.js
has 266 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import { intersectPolygon } from 'dagre-d3-es/src/dagre-js/intersect/intersect-polygon.js';
import { intersectRect } from 'dagre-d3-es/src/dagre-js/intersect/intersect-rect.js';
/**
* @param parent
File svgDraw.ts
has 266 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import type { D3Element } from '../../mermaidAPI.js';
import { createText } from '../../rendering-util/createText.js';
import type { FilledMindMapNode, MindmapDB } from './mindmapTypes.js';
import type { Point } from '../../types.js';
import { parseFontSize } from '../../utils.js';
Function addDiagrams
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const addDiagrams = () => {
if (hasLoadedDiagrams) {
return;
}
// This is added here to avoid race-conditions.
File mermaid.ts
has 265 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/**
* Web page integration module for the mermaid framework. It uses the mermaidAPI for mermaid
* functionality and to render the diagrams to svg code!
*/
import { dedent } from 'ts-dedent';
config
has 22 functions (exceeds 20 allowed). Consider refactoring. Open
Open
c4: {
...defaultConfigJson.c4,
useWidth: undefined,
personFont: function () {
return {
Function rect
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const rect = (parent, node) => {
log.info('Creating subgraph rect for ', node.id, node);
const siteConfig = getConfig();
// Add outer g element
Function addComponent
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const addComponent = function (typeC4Shape, alias, label, techn, descr, sprite, tags, link) {
// Don't allow label nulling
if (alias === null || label === null) {
return;
}
Function addContainer
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const addContainer = function (typeC4Shape, alias, label, techn, descr, sprite, tags, link) {
// Don't allow label nulling
if (alias === null || label === null) {
return;
}
Function draw
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const draw = function (text, id, version, diagObj) {
const conf = getConfig().journey;
const securityLevel = getConfig().securityLevel;
// Handle root and Document for when rendering in sandbox mode
Function calculateActorMargins
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async function calculateActorMargins(
actors: { [id: string]: any },
actorToMessageWidth: Awaited<ReturnType<typeof getMaxMessageWidthPerActor>>,
boxes
) {
Function drawTask
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const drawTask = function (elem, task, conf) {
const center = task.x + conf.width / 2;
const g = elem.append('g');
taskCount++;
const maxHeight = 300 + 5 * 30;
Function cylinder
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function cylinder(parent, bbox, node) {
const w = bbox.width;
const rx = w / 2;
const ry = rx / (2.5 + w / 50);
const h = bbox.height + ry;
Function calculateHorizontalSpace
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private calculateHorizontalSpace() {
let availableWidth = this.chartConfig.width;
let availableHeight = this.chartConfig.height;
let titleYEnd = 0;
let plotX = 0;
Function draw
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const draw = (_text: string, id: string, version: string) => {
log.debug('rendering svg for syntax error\n');
const svg: SVG = selectSvgElement(id);
const g: Group = svg.append('g');