Skip to content

Commit cb58aea

Browse files
committed
Removed some logging
1 parent 20d927c commit cb58aea

10 files changed

+13
-155
lines changed

bower.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mermaid",
3-
"version": "0.2.1",
3+
"version": "0.2.2",
44
"authors": [
55
66
],

dist/mermaid.full.js

+3-10
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/mermaid.full.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/mermaid.slim.js

+3-10
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ var addEdges = function (edges, g) {
385385
// Add the edge to the graph
386386
if (typeof edge.text === 'undefined') {
387387
if(typeof edge.style === 'undefined'){
388-
g.setEdge(edge.start, edge.end,{ arrowheadStyle: "fill: #333", arrowhead: aHead},cnt);
388+
g.setEdge(edge.start, edge.end,{ style: "stroke: #333; stroke-width: 1.5px;fill:none", arrowheadStyle: "fill: #333", arrowhead: aHead},cnt);
389389
}else{
390390
g.setEdge(edge.start, edge.end, {
391391
style: edge.style, arrowheadStyle: "fill: #333", arrowhead: aHead
@@ -396,8 +396,7 @@ var addEdges = function (edges, g) {
396396
else {
397397

398398
if(typeof edge.style === 'undefined'){
399-
console.log('Edge with Text no style: '+edge.text);
400-
g.setEdge(edge.start, edge.end,{label: edge.text, arrowheadStyle: "fill: #33f", arrowhead: aHead},cnt);
399+
g.setEdge(edge.start, edge.end,{style: "stroke: #333; stroke-width: 1.5px;fill:none", label: edge.text, arrowheadStyle: "fill: #333", arrowhead: aHead},cnt);
401400
}else{
402401

403402
g.setEdge(edge.start, edge.end, {
@@ -448,9 +447,6 @@ var drawChart = function (text, id) {
448447
classes.default = {id:'default'};
449448
classes.default.styles = ['fill:#eaeaea','stroke:#666','stroke-width:1.5px'];
450449
}
451-
452-
console.log(classes);
453-
454450
addVertices(vert, g);
455451
addEdges(edges, g);
456452

@@ -516,7 +512,6 @@ var drawChart = function (text, id) {
516512
* Go through the document and find the chart definitions in there and render the charts
517513
*/
518514
var init = function () {
519-
console.log('Mermaid v'+exports.version()+' starting');
520515
var arr = document.querySelectorAll('.mermaid');
521516

522517
var cnt = 0;
@@ -543,7 +538,7 @@ var init = function () {
543538
* @returns {string}
544539
*/
545540
exports.version = function(){
546-
return '0.2.0';
541+
return '0.2.2';
547542
}
548543

549544
var equals = function (val, variable){
@@ -656,7 +651,6 @@ exports.addClass = function (id, style) {
656651
if (typeof style !== 'undefined') {
657652
if (style !== null) {
658653
style.forEach(function (s) {
659-
console.log('Adding style'+s)
660654
classes[id].styles.push(s);
661655
});
662656
}
@@ -676,7 +670,6 @@ exports.setDirection = function (dir) {
676670
* @param dir
677671
*/
678672
exports.setClass = function (id,className) {
679-
console.log('Got id:'+id);
680673
if(id.indexOf(',')>0){
681674
id.split(',').forEach(function(id2){
682675
if(typeof vertices[id2] !== 'undefined'){

dist/mermaid.slim.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/graphDb.js

-2
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ exports.addClass = function (id, style) {
7272
if (typeof style !== 'undefined') {
7373
if (style !== null) {
7474
style.forEach(function (s) {
75-
console.log('Adding style'+s)
7675
classes[id].styles.push(s);
7776
});
7877
}
@@ -92,7 +91,6 @@ exports.setDirection = function (dir) {
9291
* @param dir
9392
*/
9493
exports.setClass = function (id,className) {
95-
console.log('Got id:'+id);
9694
if(id.indexOf(',')>0){
9795
id.split(',').forEach(function(id2){
9896
if(typeof vertices[id2] !== 'undefined'){

src/main.js

+3-8
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ var addEdges = function (edges, g) {
8888
// Add the edge to the graph
8989
if (typeof edge.text === 'undefined') {
9090
if(typeof edge.style === 'undefined'){
91-
g.setEdge(edge.start, edge.end,{ arrowheadStyle: "fill: #333", arrowhead: aHead},cnt);
91+
g.setEdge(edge.start, edge.end,{ style: "stroke: #333; stroke-width: 1.5px;fill:none", arrowheadStyle: "fill: #333", arrowhead: aHead},cnt);
9292
}else{
9393
g.setEdge(edge.start, edge.end, {
9494
style: edge.style, arrowheadStyle: "fill: #333", arrowhead: aHead
@@ -99,8 +99,7 @@ var addEdges = function (edges, g) {
9999
else {
100100

101101
if(typeof edge.style === 'undefined'){
102-
console.log('Edge with Text no style: '+edge.text);
103-
g.setEdge(edge.start, edge.end,{label: edge.text, arrowheadStyle: "fill: #33f", arrowhead: aHead},cnt);
102+
g.setEdge(edge.start, edge.end,{style: "stroke: #333; stroke-width: 1.5px;fill:none", label: edge.text, arrowheadStyle: "fill: #333", arrowhead: aHead},cnt);
104103
}else{
105104

106105
g.setEdge(edge.start, edge.end, {
@@ -151,9 +150,6 @@ var drawChart = function (text, id) {
151150
classes.default = {id:'default'};
152151
classes.default.styles = ['fill:#eaeaea','stroke:#666','stroke-width:1.5px'];
153152
}
154-
155-
console.log(classes);
156-
157153
addVertices(vert, g);
158154
addEdges(edges, g);
159155

@@ -219,7 +215,6 @@ var drawChart = function (text, id) {
219215
* Go through the document and find the chart definitions in there and render the charts
220216
*/
221217
var init = function () {
222-
console.log('Mermaid v'+exports.version()+' starting');
223218
var arr = document.querySelectorAll('.mermaid');
224219

225220
var cnt = 0;
@@ -246,7 +241,7 @@ var init = function () {
246241
* @returns {string}
247242
*/
248243
exports.version = function(){
249-
return '0.2.1';
244+
return '0.2.2';
250245
}
251246

252247
var equals = function (val, variable){

src/parser/sequence.jison

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ statement
6161

6262
action:
6363
SQS SQE
64-
{console.log('#a');$$='action';}
64+
{$$='action';}
6565
;
6666

6767
actorDefinition:

test/mermaid.html

-95
This file was deleted.

test/web.html

-26
Original file line numberDiff line numberDiff line change
@@ -2,32 +2,6 @@
22
<html>
33
<head>
44

5-
<style id="css">
6-
/* This sets the color for "TK" nodes to a light blue green. */
7-
g.type-TK > rect {
8-
fill: #ccffd0;
9-
}
10-
11-
text {
12-
font-weight: 300;
13-
font-family: "Helvetica Neue", Helvetica, Arial, sans-serf;
14-
font-size: 14px;
15-
}
16-
17-
.node rect {
18-
stroke: #999;
19-
fill: #fff;
20-
stroke-width: 1.5px;
21-
}
22-
23-
.edgePath path {
24-
stroke: #333;
25-
stroke-width: 1.5px;
26-
fill:#fff;
27-
28-
}
29-
30-
</style>
315
<script src="../dist/mermaid.full.js"></script>
326
<scrpt>
337
var mermaid_config = {

0 commit comments

Comments
 (0)