1295 Lint fixes

This commit is contained in:
Knut Sveidqvist
2020-03-14 08:24:45 +01:00
parent da048cbc7b
commit ad288be2ee
3 changed files with 6 additions and 21 deletions

View File

@@ -18,7 +18,7 @@
</head> </head>
<body> <body>
<h1>info below</h1> <h1>info below</h1>
<div style="display: flex;width: 100%; height: 100%"> <div style="display: flex;flex-direction:column;width: 100%; height: 100%">
<div class="mermaid2" style="width: 100%; height: 100%;display: none;"> <div class="mermaid2" style="width: 100%; height: 100%;display: none;">
flowchart LR flowchart LR
A --> B & C & D A --> B & C & D
@@ -33,25 +33,12 @@
C --> D C --> D
C --> D C --> D
</div> </div>
<div class="mermaid" style="width: 100%; height: 100%">
graph LR
A[apan klättrar]-- i träd -->B
subgraph id1 [Test with title wider then the node in the subgraph]
B
end
</div>
<div class="mermaid" style="width: 100%; height: 100%"> <div class="mermaid" style="width: 100%; height: 100%">
flowchart LR flowchart LR
A-- i träd -->B G-->H
G-->H
subgraph id1 [Test] subgraph id1 [Test]
B H
end
</div>
<div class="mermaid" style="width: 100%; height: 100%">
flowchart TB
C[apan klättrar]-- i träd -->D
subgraph id1 [Test]
D
end end
</div> </div>
</div> </div>

View File

@@ -32,7 +32,6 @@ const rect = (parent, node) => {
.attr('width', node.width + padding) .attr('width', node.width + padding)
.attr('height', node.height + padding); .attr('height', node.height + padding);
const adj = (node.width + node.padding - bbox.width) / 2;
logger.info('bbox', bbox.width, node.x, node.width); logger.info('bbox', bbox.width, node.x, node.width);
// Center the label // Center the label
// label.attr('transform', 'translate(' + adj + ', ' + (node.y - node.height / 2) + ')'); // label.attr('transform', 'translate(' + adj + ', ' + (node.y - node.height / 2) + ')');

View File

@@ -1,7 +1,7 @@
import dagre from 'dagre'; import dagre from 'dagre';
import insertMarkers from './markers'; import insertMarkers from './markers';
import { insertNode, positionNode } from './nodes'; import { insertNode, positionNode } from './nodes';
import { insertCluster, positionCluster, getClusterTitleWidth } from './clusters'; import { insertCluster } from './clusters';
import { insertEdgeLabel, positionEdgeLabel, insertEdge } from './edges'; import { insertEdgeLabel, positionEdgeLabel, insertEdge } from './edges';
import { logger } from '../logger'; import { logger } from '../logger';
@@ -15,7 +15,6 @@ export const render = (elem, graph) => {
// Insert nodes, this will insert them into the dom and each node will get a size. The size is updated // Insert nodes, this will insert them into the dom and each node will get a size. The size is updated
// to the abstract node and is later used by dagre for the layout // to the abstract node and is later used by dagre for the layout
const nodes2expand = [];
graph.nodes().forEach(function(v) { graph.nodes().forEach(function(v) {
const node = graph.node(v); const node = graph.node(v);
logger.info('Node ' + v + ': ' + JSON.stringify(graph.node(v))); logger.info('Node ' + v + ': ' + JSON.stringify(graph.node(v)));