Showing 429 of 1,682 total issues
Function newTitleNode
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const newTitleNode = (parentNode, id, txts) => {
let x = conf.rect_min_width / 2;
let title = parentNode
.append('text')
Function compileTasks
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const compileTasks = function () {
const compileTask = function (pos) {
const task = rawTasks[pos];
let startTime = '';
switch (rawTasks[pos].raw.startTime.type) {
Function getDrawableElement
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
getDrawableElement(): DrawableElem[] {
const finalData: [number, number][] = this.barData.data.map((d) => [
this.xAxis.getScaleValue(d[0]),
this.yAxis.getScaleValue(d[1]),
]);
Function drawTask
has 40 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 createLabel
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const createLabel = (_vertexText, style, isTitle, isNode) => {
let vertexText = _vertexText || '';
if (typeof vertexText === 'object') {
vertexText = vertexText[0];
}
Function note
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const note = async (parent: SVGAElement, node: Node) => {
const { themeVariables, handDrawnSeed } = getConfig();
const { noteBorderColor, noteBkgColor } = themeVariables;
const useHtmlLabels = node.useHtmlLabels;
Function drawEntities
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const drawEntities = function (svgNode, entities, graph) {
const keys = [...entities.keys()];
let firstOne;
keys.forEach(function (entityName) {
Function destructEndLink
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const destructEndLink = (_str: string) => {
const str = _str.trim();
let line = str.slice(0, -1);
let type = 'arrow_open';
Function docTranslator
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const docTranslator = (parent, node, first) => {
if (node.stmt === STMT_RELATION) {
docTranslator(parent, node.state1, true);
docTranslator(parent, node.state2, false);
} else {
Function boundMessage
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async function boundMessage(_diagram, msgModel): Promise<number> {
bounds.bumpVerticalPos(10);
const { startx, stopx, message } = msgModel;
const lines = common.splitBreaks(message).length;
const isKatexMsg = hasKatex(message);
Function wrap
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function wrap(text, width) {
text.each(function () {
var text = select(this),
words = text
.text()
Function getBuildConfig
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const getBuildConfig = (options: MermaidBuildOptions): BuildOptions => {
const { core, entryName, metafile, format, minify } = options;
const external: string[] = ['require', 'fs', 'path'];
const { name, file, packageName } = packageOptions[entryName];
const outFileName = getFileName(name, options);
Function rect_left_inv_arrow
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const rect_left_inv_arrow = async (
parent: SVGAElement,
node: Node
): Promise<SVGAElement> => {
const { labelStyles, nodeStyles } = styles2String(node);
Function setClickFunc
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const setClickFunc = function (_domId: string, functionName: string, functionArgs: string) {
const domId = common.sanitizeText(_domId, getConfig());
const config = getConfig();
if (config.securityLevel !== 'loose') {
return;
Function contentLoadedApi
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const contentLoadedApi = async function () {
let pos = document.location.href.indexOf('?graph=');
if (pos > 0) {
pos = pos + 7;
const graphBase64 = document.location.href.substr(pos);
Function compileData
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const compileData = function (prevTask, dataStr) {
let ds;
if (dataStr.substr(0, 1) === ':') {
ds = dataStr.substr(1, dataStr.length);
Function lean_left
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const lean_left = async (parent: SVGAElement, node: Node): Promise<SVGAElement> => {
const { labelStyles, nodeStyles } = styles2String(node);
node.labelStyle = labelStyles;
const { shapeSvg, bbox } = await labelHelper(parent, node, getNodeClasses(node));
Function createStadiumPathD
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const createStadiumPathD = (
x: number,
y: number,
totalWidth: number,
totalHeight: number
Function trapezoid
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const trapezoid = async (parent: SVGAElement, node: Node): Promise<SVGAElement> => {
const { labelStyles, nodeStyles } = styles2String(node);
node.labelStyle = labelStyles;
const { shapeSvg, bbox } = await labelHelper(parent, node, getNodeClasses(node));
Function lean_right
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const lean_right = async (parent: SVGAElement, node: Node): Promise<SVGAElement> => {
const { labelStyles, nodeStyles } = styles2String(node);
node.labelStyle = labelStyles;
const { shapeSvg, bbox } = await labelHelper(parent, node, getNodeClasses(node));