Showing 384 of 1,490 total issues
Function drawFace
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const drawFace = function (element, faceData) {
const radius = 15;
const circleElement = element
.append('circle')
.attr('cx', faceData.cx)
Function copy
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const copy = (clusterId, graph, newGraph, rootId) => {
log.warn(
'Copying children of ',
clusterId,
'root',
Function _drawTextCandidateFunc
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const _drawTextCandidateFunc = (function () {
/**
* @param {any} content
* @param {any} g
* @param {any} x
Function _drawTextCandidateFunc
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const _drawTextCandidateFunc = (function () {
/**
* @param {any} content
* @param {any} g
* @param {any} x
Function constructor
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
constructor() {
/* Base vales */
this.background = '#f4f4f4';
this.primaryColor = '#cde498';
this.secondaryColor = '#cdffb2';
Function drawC4ShapeArray
has 68 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const drawC4ShapeArray = function (currentBounds, diagram, c4ShapeArray, c4ShapeKeys) {
// Upper Y is relative point
let Y = 0;
// Draw the c4ShapeArray
for (const c4ShapeKey of c4ShapeKeys) {
Function insertEdges
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export async function insertEdges(
elem: any,
edges: Block[],
blocks: Block[],
db: BlockDB,
Function getMaxMessageWidthPerActor
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async function getMaxMessageWidthPerActor(
actors: { [id: string]: any },
messages: any[],
diagObj: Diagram
): Promise<{ [id: string]: number }> {
File timelineRenderer.ts
has 278 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
// @ts-nocheck - don't check until handle it
import type { Selection } from 'd3';
import { select } from 'd3';
import svgDraw from './svgDraw.js';
import { log } from '../../logger.js';
File markers.js
has 277 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/** Setup arrow head and define the marker. The result is appended to the svg. */
import { log } from '../logger.js';
// Only add the number of markers that the diagram needs
Function draw
has 66 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const draw = function (_text, id, _version, diagObj) {
conf = getConfig().c4;
const securityLevel = getConfig().securityLevel;
// Handle root and Document for when rendering in sandbox mode
let sandboxElement;
Function populateBlockDatabase
has 66 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const populateBlockDatabase = (_blockList: Block[] | Block[][], parent: Block): void => {
const blockList = _blockList.flat();
const children = [];
for (const block of blockList) {
if (block.label) {
Function layoutBlocks
has 66 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function layoutBlocks(block: Block, db: BlockDB) {
log.debug(
`abc85 layout blocks (=>layoutBlocks) ${block.id} x: ${block?.size?.x} y: ${block?.size?.y} width: ${block?.size?.width}`
);
const columns = block.columns || -1;
File layout.ts
has 276 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import type { BlockDB } from './blockDB.js';
import type { Block } from './blockTypes.js';
import { log } from '../../logger.js';
import { getConfig } from '../../diagram-api/diagramAPI.js';
const padding = getConfig()?.block?.padding || 8;
Function drawBoundary
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const drawBoundary = function (elem, boundary, conf) {
const boundaryElem = elem.append('g');
let fillColor = boundary.bgColor ? boundary.bgColor : 'none';
let strokeColor = boundary.borderColor ? boundary.borderColor : '#444444';
Function _drawTextCandidateFunc
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const _drawTextCandidateFunc = (function () {
/**
* @param {any} content
* @param {any} g
* @param {any} x
Function cylinder
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const cylinder = async (parent, node) => {
const { shapeSvg, bbox } = await labelHelper(
parent,
node,
getClassesFromNode(node, undefined),
Function addTitleAndBox
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const addTitleAndBox = (g, stateDef, altBkg) => {
const pad = getConfig().state.padding;
const dblPad = 2 * getConfig().state.padding;
const orgBox = g.node().getBBox();
const orgWidth = orgBox.width;
Function adjustCreatedDestroyedData
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function adjustCreatedDestroyedData(
msg,
msgModel,
lineStartY,
index,
Function _drawMenuItemTextCandidateFunc
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const _drawMenuItemTextCandidateFunc = (function () {
/**
* @param {any} content
* @param {any} g
* @param {any} x