diff --git a/src/dagre-wrapper/mermaid-graphlib.spec.js b/src/dagre-wrapper/mermaid-graphlib.spec.js index e6a9506e8..70b455726 100644 --- a/src/dagre-wrapper/mermaid-graphlib.spec.js +++ b/src/dagre-wrapper/mermaid-graphlib.spec.js @@ -43,8 +43,6 @@ describe('Graphlib decorations', () => { g.setEdge('a', 'b'); g.setEdge('C1', 'C2'); - console.log(g.nodes()) - expect(validate(g)).toBe(false); }); it('Validate should not detect edges between clusters after adjustment', function () { @@ -66,7 +64,6 @@ describe('Graphlib decorations', () => { g.setEdge('a', 'b'); g.setEdge('C1', 'C2'); - console.log(g.nodes()) adjustClustersAndEdges(g); logger.info(g.edges()) expect(validate(g)).toBe(true); diff --git a/src/diagrams/flowchart/flowDb.js b/src/diagrams/flowchart/flowDb.js index a730a1496..3a813d396 100644 --- a/src/diagrams/flowchart/flowDb.js +++ b/src/diagrams/flowchart/flowDb.js @@ -461,14 +461,12 @@ export const addSubGraph = function(_id, list, _title) { subGraphs.forEach(sg => { const pos = sg.nodes.indexOf(_id); if (pos >= 0) { - console.log(sg.nodes, pos, _id); sg.nodes.splice(pos, 1); } }); }; // Removes the members of this subgraph from any other subgraphs, a node only belong to one subgraph subGraph.nodes.forEach(_id => del(_id)); - console.log(subGraph.nodes); subGraphs.push(subGraph); subGraphLookup[id] = subGraph; return id; diff --git a/src/diagrams/flowchart/parser/flow-huge.spec.js b/src/diagrams/flowchart/parser/flow-huge.spec.js index 8cdfd7593..18db78b1b 100644 --- a/src/diagrams/flowchart/parser/flow-huge.spec.js +++ b/src/diagrams/flowchart/parser/flow-huge.spec.js @@ -21,7 +21,6 @@ describe('[Text] when parsing', () => { expect(edges[0].type).toBe('arrow_point'); expect(edges.length).toBe(47917); - console.log(vert); expect(Object.keys(vert).length).toBe(2); }); diff --git a/src/diagrams/flowchart/parser/flow.spec.js b/src/diagrams/flowchart/parser/flow.spec.js index 61e56e6ce..ad701c06d 100644 --- a/src/diagrams/flowchart/parser/flow.spec.js +++ b/src/diagrams/flowchart/parser/flow.spec.js @@ -121,7 +121,6 @@ describe('when parsing ', function() { const res = flow.parser.parse(statement); const vertices = flow.parser.yy.getVertices(); - console.log(vertices); const classes = flow.parser.yy.getClasses(); expect(vertices['node1TB'].id).toBe('node1TB'); }); @@ -132,7 +131,6 @@ describe('when parsing ', function() { statement = statement + 'graph TD;A--x|text including URL space|B;'; const res = flow.parser.parse(statement); const vertices = flow.parser.yy.getVertices(); - console.log(vertices); const classes = flow.parser.yy.getClasses(); expect(vertices['A'].id).toBe('A'); }); @@ -142,7 +140,6 @@ describe('when parsing ', function() { statement = statement + 'graph TB;subgraph "number as labels";1;end;'; const res = flow.parser.parse(statement); const vertices = flow.parser.yy.getVertices(); - console.log(vertices); const classes = flow.parser.yy.getClasses(); expect(vertices['1'].id).toBe('1'); }); diff --git a/src/diagrams/flowchart/parser/subgraph.spec.js b/src/diagrams/flowchart/parser/subgraph.spec.js index 9ba7864ca..6a7fefb71 100644 --- a/src/diagrams/flowchart/parser/subgraph.spec.js +++ b/src/diagrams/flowchart/parser/subgraph.spec.js @@ -288,7 +288,6 @@ describe('when parsing subgraphs', function() { expect(subgraphA.nodes).not.toContain('c'); }); it('should handle nested subgraphs 3', function() { - console.log('#3'); const res = flow.parser.parse(`flowchart TB subgraph B c @@ -304,7 +303,6 @@ describe('when parsing subgraphs', function() { const subgraphA = filter(subgraphs,o => o.id === 'A')[0]; const subgraphB = filter(subgraphs,o => o.id === 'B')[0]; - console.log(subgraphB.nodes) expect(subgraphB.nodes[0]).toBe('c'); expect(subgraphA.nodes).toContain('B'); expect(subgraphA.nodes).toContain('b'); diff --git a/src/diagrams/pie/parser/pie.jison b/src/diagrams/pie/parser/pie.jison index 67de2c562..de0030d5a 100644 --- a/src/diagrams/pie/parser/pie.jison +++ b/src/diagrams/pie/parser/pie.jison @@ -20,7 +20,7 @@ \}\%\% { this.popState(); this.popState(); return 'close_directive'; } ((?:(?!\}\%\%).|\n)*) return 'arg_directive'; \%\%(?!\{)[^\n]* /* skip comments */ -[^\}]\%\%[^\n]* /* skip comments */{ console.log('Crap after close'); } +[^\}]\%\%[^\n]* /* skip comments */{ /*console.log('');*/ } [\n\r]+ return 'NEWLINE'; \%\%[^\n]* /* do nothing */ [\s]+ /* ignore */ diff --git a/src/diagrams/pie/parser/pie.spec.js b/src/diagrams/pie/parser/pie.spec.js index 3d94fea44..c877231fb 100644 --- a/src/diagrams/pie/parser/pie.spec.js +++ b/src/diagrams/pie/parser/pie.spec.js @@ -17,7 +17,6 @@ describe('when parsing pie', function() { "ash" : 100 `); const sections = pieDb.getSections(); - console.log('sections: ', sections); const section1 = sections['ash']; expect(section1).toBe(100); }); @@ -27,7 +26,6 @@ describe('when parsing pie', function() { "bat" : 40 `); const sections = pieDb.getSections(); - console.log('sections: ', sections); const section1 = sections['ash']; expect(section1).toBe(60); }); @@ -38,7 +36,6 @@ describe('when parsing pie', function() { "bat" : 40 `); const sections = pieDb.getSections(); - console.log('sections: ', sections); const section1 = sections['ash']; expect(section1).toBe(60); }); @@ -50,7 +47,6 @@ pie "bat" : 40 `); const sections = pieDb.getSections(); - console.log('sections: ', sections); const section1 = sections['ash']; expect(section1).toBe(60); }); @@ -62,7 +58,6 @@ pie `); const sections = pieDb.getSections(); const title = pieDb.getTitle(); - console.log('sections: ', sections); const section1 = sections['ash']; expect(section1).toBe(60); expect(title).toBe('a 60/40 pie'); @@ -74,7 +69,6 @@ pie "bat" : 40 `); const sections = pieDb.getSections(); - console.log('sections: ', sections); const section1 = sections['ash']; expect(section1).toBe(60.67); }); diff --git a/src/diagrams/pie/pieRenderer.js b/src/diagrams/pie/pieRenderer.js index 9cc8ac638..8f0f0aa94 100644 --- a/src/diagrams/pie/pieRenderer.js +++ b/src/diagrams/pie/pieRenderer.js @@ -44,7 +44,6 @@ export const draw = (txt, id) => { } const diagram = select('#' + id); - console.log('conf', conf); configureSvgSize(diagram, height, width, conf.useMaxWidth); // Set viewBox diff --git a/src/diagrams/sequence/sequenceDb.js b/src/diagrams/sequence/sequenceDb.js index db9a15876..74247b637 100644 --- a/src/diagrams/sequence/sequenceDb.js +++ b/src/diagrams/sequence/sequenceDb.js @@ -43,7 +43,6 @@ const activationCount = part => { let i; let count = 0; for (i = 0; i < messages.length; i++) { - // console.warn(i, messages[i]); if (messages[i].type === LINETYPE.ACTIVE_START) { if (messages[i].from.actor === part) { count++; diff --git a/src/diagrams/sequence/sequenceDiagram.spec.js b/src/diagrams/sequence/sequenceDiagram.spec.js index f8f11a4a5..12e934ed1 100644 --- a/src/diagrams/sequence/sequenceDiagram.spec.js +++ b/src/diagrams/sequence/sequenceDiagram.spec.js @@ -942,7 +942,6 @@ describe('when rendering a sequenceDiagram APA', function() { wrap: false, mirrorActors: false }; - console.warn('Set site config'); configApi.setSiteConfig({ logLevel: 5, sequence: conf }); }); let conf; @@ -1249,7 +1248,6 @@ Bob->>Alice: Fine!`; const { bounds, models } = renderer.bounds.getBounds(); const msgs = parser.yy.getMessages(); const mermaid = mermaidAPI.getConfig(); - console.log(mermaid) expect(bounds.startx).toBe(-(conf.width / 2) - conf.actorMargin / 2); expect(bounds.starty).toBe(0); expect(mermaid.theme).toBe('dark'); diff --git a/src/diagrams/state/shapes.js b/src/diagrams/state/shapes.js index e6c2df3ce..4e920510d 100644 --- a/src/diagrams/state/shapes.js +++ b/src/diagrams/state/shapes.js @@ -169,7 +169,6 @@ export const addTitleAndBox = (g, stateDef, altBkg) => { // .attr('class', 'descr-divider'); const graphBox = g.node().getBBox(); - // console.warn(width / 2, titleWidth / 2, getConfig().state.padding, orgBox); // descrLine.attr('x2', graphBox.width + getConfig().state.padding); if (stateDef.doc) { @@ -328,7 +327,6 @@ const _drawLongText = (_text, x, y, g) => { const textBounds = span.node().getBBox(); tHeight += textBounds.height; } - // console.warn('textBounds', textBounds); textHeight += tHeight; span.attr('x', x + getConfig().state.noteMargin); span.attr('y', y + textHeight + 1.25 * getConfig().state.noteMargin); @@ -456,8 +454,6 @@ export const drawEdge = function(elem, path, relation) { const rows = common.getRows(relation.title); - // console.warn(rows); - let titleHeight = 0; const titleRows = []; let maxWidth = 0; diff --git a/src/themes/theme-dark.js b/src/themes/theme-dark.js index cfc7ea613..f828d8176 100644 --- a/src/themes/theme-dark.js +++ b/src/themes/theme-dark.js @@ -166,6 +166,5 @@ class Theme { export const getThemeVariables = userOverrides => { const theme = new Theme(); theme.calculate(userOverrides); - // console.info('Theme(dark)', { userOverrides, theme }); return theme; }; diff --git a/src/themes/theme-default.js b/src/themes/theme-default.js index 41e6a96d4..e07702da0 100644 --- a/src/themes/theme-default.js +++ b/src/themes/theme-default.js @@ -177,6 +177,5 @@ class Theme { export const getThemeVariables = userOverrides => { const theme = new Theme(); theme.calculate(userOverrides); - // console.info('Theme(default)', { userOverrides, theme }); return theme; }; diff --git a/src/themes/theme-forest.js b/src/themes/theme-forest.js index f17046075..7b0b6ffc6 100644 --- a/src/themes/theme-forest.js +++ b/src/themes/theme-forest.js @@ -147,6 +147,5 @@ class Theme { export const getThemeVariables = userOverrides => { const theme = new Theme(); theme.calculate(userOverrides); - // console.info('Theme(forest)', { userOverrides, theme }); return theme; }; diff --git a/src/themes/theme-neutral.js b/src/themes/theme-neutral.js index 465e8d2e0..847e293ac 100644 --- a/src/themes/theme-neutral.js +++ b/src/themes/theme-neutral.js @@ -13,7 +13,6 @@ class Theme { // this.secondaryColor = adjust(this.primaryColor, { h: 120 }); this.tertiaryColor = adjust(this.primaryColor, { h: -160 }); - // console.log('primary color', this.primaryColor, 'tertiary - color', this.tertiaryColor); this.primaryBorderColor = mkBorder(this.primaryColor, this.darkMode); this.secondaryBorderColor = mkBorder(this.secondaryColor, this.darkMode); this.tertiaryBorderColor = mkBorder(this.tertiaryColor, this.darkMode); @@ -185,6 +184,5 @@ class Theme { export const getThemeVariables = userOverrides => { const theme = new Theme(); theme.calculate(userOverrides); - // console.info('Theme(neutral)', { userOverrides, theme }); return theme; }; diff --git a/src/utils.js b/src/utils.js index c2fb6c42e..f41b5af5a 100644 --- a/src/utils.js +++ b/src/utils.js @@ -787,7 +787,6 @@ export const calculateSvgSizeAttrs = function(height, width, useMaxWidth) { export const configureSvgSize = function(svgElem, height, width, useMaxWidth) { const attrs = calculateSvgSizeAttrs(height, width, useMaxWidth); - console.log('svgElem', svgElem); d3Attrs(svgElem, attrs); };