mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-01-28 07:03:17 +08:00
Removing console.logs
This commit is contained in:
parent
04338335d0
commit
c691ef1899
@ -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);
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
});
|
||||
|
||||
|
@ -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');
|
||||
});
|
||||
|
@ -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');
|
||||
|
@ -20,7 +20,7 @@
|
||||
<type_directive,arg_directive>\}\%\% { this.popState(); this.popState(); return 'close_directive'; }
|
||||
<arg_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 */
|
||||
|
@ -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);
|
||||
});
|
||||
|
@ -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
|
||||
|
@ -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++;
|
||||
|
@ -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');
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
};
|
||||
|
@ -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;
|
||||
};
|
||||
|
@ -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;
|
||||
};
|
||||
|
@ -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;
|
||||
};
|
||||
|
@ -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);
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user