mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-18 23:09:49 +02:00
Fix linters
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" xmlns="http://www.w3.org/1999/html">
|
||||
<head>
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<title>States Mermaid Quick Test Page</title>
|
||||
@@ -11,8 +12,9 @@
|
||||
font-family: 'Courier New', Courier, monospace !important;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h1>Sankey diagram demos</h1>
|
||||
<h2>Simple flow</h2>
|
||||
<pre class="mermaid">
|
||||
@@ -35,5 +37,6 @@
|
||||
sequence: { actorMargin: 50 },
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</body>
|
||||
|
||||
</html>
|
@@ -42,7 +42,7 @@ export const draw = function (text: string, id: string, _version: string, diagOb
|
||||
}
|
||||
// Launch parsing
|
||||
diagObj.parser.parse(text);
|
||||
debugger;
|
||||
// debugger;
|
||||
log.debug('Parsed sankey diagram');
|
||||
|
||||
// Figure out what is happening there
|
||||
@@ -86,20 +86,20 @@ export const draw = function (text: string, id: string, _version: string, diagOb
|
||||
// ]
|
||||
// };
|
||||
//
|
||||
let graph = {
|
||||
const graph = {
|
||||
nodes: [],
|
||||
links: []
|
||||
}
|
||||
|
||||
diagObj.db.getNodes().forEach(node => {
|
||||
graph.nodes.push({id: node.ID});
|
||||
graph.nodes.push({ id: node.ID });
|
||||
});
|
||||
|
||||
diagObj.db.getLinks().forEach(link => {
|
||||
graph.links.push({source: link.source.ID, target: link.target.ID, value: link.value});
|
||||
graph.links.push({ source: link.source.ID, target: link.target.ID, value: link.value });
|
||||
});
|
||||
|
||||
debugger;
|
||||
// debugger;
|
||||
// const graph = {
|
||||
// nodes: [
|
||||
// { id: 'Alice' },
|
||||
@@ -158,7 +158,7 @@ export const draw = function (text: string, id: string, _version: string, diagOb
|
||||
.attr('x', (d) => d.x0)
|
||||
.attr('y', (d) => d.y0)
|
||||
.append('rect')
|
||||
.attr('height', (d) => {console.log(d); return (d.y1 - d.y0);})
|
||||
.attr('height', (d) => { console.log(d); return (d.y1 - d.y0); })
|
||||
.attr('width', (d) => d.x1 - d.x0)
|
||||
.attr('fill', (d) => color(d.id));
|
||||
|
||||
|
Reference in New Issue
Block a user