Showing 384 of 1,490 total issues
Function cross
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const cross = (elem, type, id) => {
elem
.append('marker')
.attr('id', id + '_' + type + '-crossEnd')
.attr('class', 'marker cross ' + type)
Function doublecircle
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const doublecircle = async (parent, node) => {
const { shapeSvg, bbox, halfPadding } = await labelHelper(
parent,
node,
getClassesFromNode(node, undefined),
Function drawRelationshipFromLayout
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const drawRelationshipFromLayout = function (svg, rel, g, insert, diagObj) {
// Find the edge relating to this relationship
const edge = g.edge(elementString(rel.src), elementString(rel.dst));
// Get a function that will generate the line path
Function point
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const point = (elem, type, id) => {
elem
.append('marker')
.attr('id', id + '_' + type + '-pointEnd')
.attr('class', 'marker ' + type)
Function lollipop
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const lollipop = (elem, type, id) => {
elem
.append('defs')
.append('marker')
.attr('id', id + '_' + type + '-lollipopStart')
Function markdownToLines
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function markdownToLines(markdown: string): MarkdownLine[] {
const preprocessedMarkdown = preprocessMarkdown(markdown);
const { children } = fromMarkdown(preprocessedMarkdown);
const lines: MarkdownLine[] = [[]];
let currentLine = 0;
Function setupDoc
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const setupDoc = (g, parentParsedItem, doc, diagramStates, diagramDb, altFlag) => {
// graphItemCount = 0;
log.trace('items', doc);
doc.forEach((item) => {
switch (item.stmt) {
Function layoutMindmap
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function layoutMindmap(node: MindmapNode, conf: MermaidConfig): Promise<cytoscape.Core> {
return new Promise((resolve) => {
// Add temporary render element
const renderEl = select('body').append('div').attr('id', 'cy').attr('style', 'display:none');
const cy = cytoscape({
Function addNodes
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function addNodes(mindmap: MindmapNode, cy: cytoscape.Core, conf: MermaidConfig, level: number) {
cy.add({
group: 'nodes',
data: {
id: mindmap.id.toString(),
Function drawKatex
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const drawKatex = async function (elem, textData, msgModel = null) {
let textElem = elem.append('foreignObject');
const lines = await renderKatex(textData.text, configApi.getConfig());
const divElem = textElem
Function parseBoxData
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const parseBoxData = function (str) {
const match = str.match(/^((?:rgba?|hsla?)\s*\(.*\)|\w*)(.*)$/);
let color = match != null && match[1] ? match[1].trim() : 'transparent';
let title = match != null && match[2] ? match[2].trim() : undefined;
Function newBodyNode
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const newBodyNode = (parentNode, id, txts, yStart) => {
let body = parentNode
.append('text')
.attr('class', 'req reqLabel')
.attr('id', id)
Function draw
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const draw = function (txt, id, ver) {
try {
logger.debug('in gitgraph renderer', txt + '\n', 'id:', id, ver);
config = Object.assign(config, apiConfig, db.getOptions());
Function addSingleLink
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const addSingleLink = function (_start, _end, type) {
let start = _start;
let end = _end;
// if (start[0].match(/\d/)) start = MERMAID_DOM_ID_PREFIX + start;
// if (end[0].match(/\d/)) end = MERMAID_DOM_ID_PREFIX + end;
Function splitLineToFitWidthRecursion
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function splitLineToFitWidthRecursion(
words: MarkdownWord[],
checkFit: CheckFitFunction,
lines: MarkdownLine[] = [],
newLine: MarkdownLine = []
Function insert
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
insert(c4Shape) {
this.nextData.cnt = this.nextData.cnt + 1;
let _startx =
this.nextData.startx === this.nextData.stopx
? this.nextData.stopx + c4Shape.margin
Function addHtmlSpan
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function addHtmlSpan(element, node, width, classes, addBackground = false) {
const fo = element.append('foreignObject');
const div = fo.append('xhtml:div');
const label = node.label;
Function getDrawableElement
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
getDrawableElement(): DrawableElem[] {
const finalData: [number, number][] = this.plotData.data.map((d) => [
this.xAxis.getScaleValue(d[0]),
this.yAxis.getScaleValue(d[1]),
]);
Function drawLabel
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const drawLabel = function (elem, txtObject) {
/**
* @param {any} x
* @param {any} y
* @param {any} width
Function drawLabel
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const drawLabel = function (elem, txtObject) {
/**
* @param {any} x
* @param {any} y
* @param {any} width