From ad288be2ee3f74ef4be793f6dcb875b77bb11241 Mon Sep 17 00:00:00 2001 From: Knut Sveidqvist Date: Sat, 14 Mar 2020 08:24:45 +0100 Subject: [PATCH] 1295 Lint fixes --- cypress/platform/current.html | 23 +++++------------------ src/dagre-wrapper/clusters.js | 1 - src/dagre-wrapper/index.js | 3 +-- 3 files changed, 6 insertions(+), 21 deletions(-) diff --git a/cypress/platform/current.html b/cypress/platform/current.html index 10020a018..0e151cdd0 100644 --- a/cypress/platform/current.html +++ b/cypress/platform/current.html @@ -18,7 +18,7 @@

info below

-
+
-
- graph LR - A[apan klättrar]-- i träd -->B - subgraph id1 [Test with title wider then the node in the subgraph] - B - end -
flowchart LR - A-- i träd -->B - subgraph id1 [Test] - B - end -
-
- flowchart TB - C[apan klättrar]-- i träd -->D - subgraph id1 [Test] - D + G-->H + G-->H + subgraph id1 [Test] + H end
diff --git a/src/dagre-wrapper/clusters.js b/src/dagre-wrapper/clusters.js index c0701ed71..74947b46d 100644 --- a/src/dagre-wrapper/clusters.js +++ b/src/dagre-wrapper/clusters.js @@ -32,7 +32,6 @@ const rect = (parent, node) => { .attr('width', node.width + padding) .attr('height', node.height + padding); - const adj = (node.width + node.padding - bbox.width) / 2; logger.info('bbox', bbox.width, node.x, node.width); // Center the label // label.attr('transform', 'translate(' + adj + ', ' + (node.y - node.height / 2) + ')'); diff --git a/src/dagre-wrapper/index.js b/src/dagre-wrapper/index.js index f1c98060f..d2f12c491 100644 --- a/src/dagre-wrapper/index.js +++ b/src/dagre-wrapper/index.js @@ -1,7 +1,7 @@ import dagre from 'dagre'; import insertMarkers from './markers'; import { insertNode, positionNode } from './nodes'; -import { insertCluster, positionCluster, getClusterTitleWidth } from './clusters'; +import { insertCluster } from './clusters'; import { insertEdgeLabel, positionEdgeLabel, insertEdge } from './edges'; 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 // to the abstract node and is later used by dagre for the layout - const nodes2expand = []; graph.nodes().forEach(function(v) { const node = graph.node(v); logger.info('Node ' + v + ': ' + JSON.stringify(graph.node(v)));