Showing 384 of 1,490 total issues
File svgDraw.js
has 300 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import { line, curveBasis } from 'd3';
import utils from '../../utils.js';
import { log } from '../../logger.js';
import { parseGenericTypes } from '../common/common.js';
Function updateElStyle
has 79 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const updateElStyle = function (
typeC4Shape,
elementName,
bgColor,
fontColor,
File theme-forest.js
has 296 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import { darken, lighten, adjust, invert, isDark } from 'khroma';
import { mkBorder } from './theme-helpers.js';
import {
oldAttributeBackgroundColorEven,
oldAttributeBackgroundColorOdd,
File theme-base.js
has 295 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import { darken, lighten, adjust, invert, isDark, toRgba } from 'khroma';
import { mkBorder } from './theme-helpers.js';
import {
oldAttributeBackgroundColorEven,
oldAttributeBackgroundColorOdd,
Function renderCommitHistory
has 77 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function renderCommitHistory(svg, commitId, branches, direction) {
let commit;
const numCommits = Object.keys(allCommitsDict).length;
if (typeof commitId === 'string') {
do {
File requirementRenderer.js
has 294 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import { line, select } from 'd3';
import { layout as dagreLayout } from 'dagre-d3-es/src/dagre/index.js';
import * as graphlib from 'dagre-d3-es/src/graphlib/index.js';
import { log } from '../../logger.js';
import { configureSvgSize } from '../../setupGraphViewbox.js';
Function positionEdgeLabel
has 76 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const positionEdgeLabel = (edge, paths) => {
log.debug('Moving label abc88 ', edge.id, edge.label, edgeLabels[edge.id], paths);
let path = paths.updatedPath ? paths.updatedPath : paths.originalPath;
const siteConfig = getConfig();
const { subGraphTitleTotalMargin } = getSubGraphTitleMargins(siteConfig);
Function insertEdge
has 76 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const insertEdge = function (elem, e, edge, clusterDb, diagramType, graph, id) {
let points = edge.points;
log.debug('abc88 InsertEdge: edge=', edge, 'e=', e);
let pointsHasChanged = false;
const tail = graph.node(e.v);
Function buildNoteModel
has 75 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const buildNoteModel = async function (msg, actors, diagObj) {
const startx = actors[msg.from].x;
const stopx = actors[msg.to].x;
const shouldWrap = msg.wrap && msg.message;
File theme-neutral.js
has 291 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import { invert, darken, lighten, adjust, isDark } from 'khroma';
import { mkBorder } from './theme-helpers.js';
import {
oldAttributeBackgroundColorEven,
oldAttributeBackgroundColorOdd,
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 getDrawableElementsForLeftAxis
has 74 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private getDrawableElementsForLeftAxis(): DrawableElem[] {
const drawableElement: DrawableElem[] = [];
if (this.showAxisLine) {
const x = this.boundingRect.x + this.boundingRect.width - this.axisConfig.axisLineWidth / 2;
drawableElement.push({
Function getDrawableElementsForBottomAxis
has 74 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private getDrawableElementsForBottomAxis(): DrawableElem[] {
const drawableElement: DrawableElem[] = [];
if (this.showAxisLine) {
const y = this.boundingRect.y + this.axisConfig.axisLineWidth / 2;
drawableElement.push({
Function getDrawableElementsForTopAxis
has 74 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private getDrawableElementsForTopAxis(): DrawableElem[] {
const drawableElement: DrawableElem[] = [];
if (this.showAxisLine) {
const y = this.boundingRect.y + this.boundingRect.height - this.axisConfig.axisLineWidth / 2;
drawableElement.push({
File theme-dark.js
has 289 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import { invert, lighten, darken, rgba, adjust, isDark } from 'khroma';
import { mkBorder } from './theme-helpers.js';
class Theme {
constructor() {
Function drawActorTypeParticipant
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const drawActorTypeParticipant = async function (elem, actor, conf, isFooter) {
const actorY = isFooter ? actor.stopy : actor.starty;
const center = actor.x + actor.width / 2;
const centerY = actorY + 5;
Function constructor
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
constructor() {
this.primaryColor = '#eee';
this.contrast = '#707070';
this.secondaryColor = lighten(this.contrast, 55);
this.background = '#ffffff';
Function constructor
has 72 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
constructor() {
this.background = '#333';
this.primaryColor = '#1f2020';
this.secondaryColor = lighten(this.primaryColor, 16);
Function drawExcludeDays
has 72 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function drawExcludeDays(theGap, theTopPad, theSidePad, w, h, tasks, excludes, includes) {
if (excludes.length === 0 && includes.length === 0) {
return;
}
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)