Skip to content

Commit

Permalink
mermaid-js#1223 Removing/updating some logging, adding current.html t…
Browse files Browse the repository at this point in the history
…o .gitignore
  • Loading branch information
knsv committed Jan 29, 2020
1 parent ec90537 commit c43f791
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 10 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ yarn-error.log
token

package-lock.json
cypress/platform/current.html
9 changes: 4 additions & 5 deletions cypress/platform/current.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,21 @@
rel="stylesheet"
/>
<style>
body {background: black}
body {background: white}
h1 { color: white;}
.arrowheadPath {fill: red;}

.edgePath .path {stroke: red;}


</style>
</head>
<body>
<h1>info below</h1>
<div style="display: flex;width: 100%; height: 100%">
<div class="mermaid" style="width: 100%; height: 100%">
stateDiagram
a --> b: Status
a --> b: Stop

NotFound --> NotFound: Status
NotFound --> NotFound: Stop

</div>
</div>
Expand Down
1 change: 0 additions & 1 deletion src/diagrams/state/stateDb.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@ export const addRelation = function(_id1, _id2, title) {
}
addState(id1, type1);
addState(id2, type2);
console.info('Adding relation', { id1, id2, title });
currentDocument.relations.push({ id1, id2, title });
};

Expand Down
7 changes: 3 additions & 4 deletions src/diagrams/state/stateRenderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ const renderDoc = (doc, diagram, parentId, altBkg) => {
}
}

logger.info('Count=', graph.nodeCount(), graph);
logger.debug('Count=', graph.nodeCount(), graph);
let cnt = 0;
relations.forEach(function(relation) {
cnt++;
Expand Down Expand Up @@ -292,8 +292,7 @@ const renderDoc = (doc, diagram, parentId, altBkg) => {

graph.edges().forEach(function(e) {
if (typeof e !== 'undefined' && typeof graph.edge(e) !== 'undefined') {
// logger.debug('Edge ' + e.v + ' -> ' + e.w + ': ' + JSON.stringify(graph.edge(e)));
logger.debug('Edge ' + e.v + ' -> ' + e.w + ': ' + JSON.stringify(graph.edge(e).points));
logger.debug('Edge ' + e.v + ' -> ' + e.w + ': ' + JSON.stringify(graph.edge(e)));
drawEdge(diagram, graph.edge(e), graph.edge(e).relation);
}
});
Expand All @@ -310,7 +309,7 @@ const renderDoc = (doc, diagram, parentId, altBkg) => {
stateInfo.width = stateBox.width + 2 * conf.padding;
stateInfo.height = stateBox.height + 2 * conf.padding;

logger.info('Doc rendered', stateInfo, graph);
logger.debug('Doc rendered', stateInfo, graph);
return stateInfo;
};

Expand Down

0 comments on commit c43f791

Please sign in to comment.