From 89c1853977de72bb37ee8b714eabd623a65f4116 Mon Sep 17 00:00:00 2001 From: Knut Sveidqvist Date: Fri, 21 Feb 2020 09:50:04 +0100 Subject: [PATCH] #1261 Removed calls to console.log --- src/diagrams/flowchart/flowDb.js | 5 ----- src/diagrams/flowchart/flowRenderer.js | 4 ---- src/diagrams/pie/pieDb.js | 1 - src/mermaidAPI.js | 2 -- 4 files changed, 12 deletions(-) diff --git a/src/diagrams/flowchart/flowDb.js b/src/diagrams/flowchart/flowDb.js index b0c926696..404fdfceb 100644 --- a/src/diagrams/flowchart/flowDb.js +++ b/src/diagrams/flowchart/flowDb.js @@ -157,7 +157,6 @@ export const addClass = function(id, style) { if (typeof style !== 'undefined') { if (style !== null) { style.forEach(function(s) { - console.log('style', s); if (s.match('color')) { const newStyle1 = s.replace('fill', 'bgFill'); const newStyle2 = newStyle1.replace('color', 'fill'); @@ -202,8 +201,6 @@ export const setClass = function(ids, className) { vertices[id].classes.push(className); } - console.log('Setting class', className, id, subGraphLookup[id]); - if (typeof subGraphLookup[id] !== 'undefined') { subGraphLookup[id].classes.push(className); } @@ -381,7 +378,6 @@ export const defaultStyle = function() { * Clears the internal graph db so that a new graph can be parsed. */ export const addSubGraph = function(_id, list, _title) { - console.log('Adding subgraph', _id); let id = _id.trim(); let title = _title; if (_id === _title && _title.match(/\s/)) { @@ -419,7 +415,6 @@ export const addSubGraph = function(_id, list, _title) { const subGraph = { id: id, nodes: nodeList, title: title.trim(), classes: [] }; subGraphs.push(subGraph); subGraphLookup[id] = subGraph; - console.log('Adding subgraph', id, subGraphs, subGraphLookup); return id; }; diff --git a/src/diagrams/flowchart/flowRenderer.js b/src/diagrams/flowchart/flowRenderer.js index 924e8dd03..8b1a95046 100644 --- a/src/diagrams/flowchart/flowRenderer.js +++ b/src/diagrams/flowchart/flowRenderer.js @@ -269,9 +269,6 @@ export const draw = function(text, id) { logger.debug('Parsing failed'); } - console.log('Classes:', flowDb.getClasses()); - console.log('Subgraphs:', flowDb.getSubGraphs()); - // Fetch the default direction, use TD if none was found let dir = flowDb.getDirection(); if (typeof dir === 'undefined') { @@ -420,7 +417,6 @@ export const draw = function(text, id) { te.attr('transform', `translate(${xPos + width / 2}, ${yPos + 14})`); te.attr('id', id + 'Text'); - console.log('Fixing subgraph', id, subG.id, subG.classes); // eslitn-disable-line for (let j = 0; j < subG.classes.length; j++) { clusterEl[0].classList.add(subG.classes[j]); } diff --git a/src/diagrams/pie/pieDb.js b/src/diagrams/pie/pieDb.js index d4572b547..047e24e40 100644 --- a/src/diagrams/pie/pieDb.js +++ b/src/diagrams/pie/pieDb.js @@ -10,7 +10,6 @@ const addSection = function(id, value) { if (typeof sections[id] === 'undefined') { sections[id] = value; logger.debug('Added new section :', id); - // console.log('Added new section:', id, value) } }; const getSections = () => sections; diff --git a/src/mermaidAPI.js b/src/mermaidAPI.js index 6f4170cb4..205254540 100644 --- a/src/mermaidAPI.js +++ b/src/mermaidAPI.js @@ -533,7 +533,6 @@ const render = function(id, _txt, cb, container) { // classDef if (graphType === 'flowchart') { const classes = flowRenderer.getClasses(txt); - console.log('classes in mermaidApi', classes); for (const className in classes) { style += `\n.${className} > * { ${classes[className].styles.join( ' !important; ' @@ -544,7 +543,6 @@ const render = function(id, _txt, cb, container) { )} !important; }`; } } - console.log(style); } const style1 = document.createElement('style');