Skip to content

Commit

Permalink
Change string concatenation to template literal
Browse files Browse the repository at this point in the history
  • Loading branch information
mathbraga committed Jan 16, 2024
1 parent 8c7edeb commit 96ac236
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions packages/mermaid/src/dagre-wrapper/clusters.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,15 +184,13 @@ const roundedWithTitle = (parent, node) => {
// Center the label
label.attr(
'transform',
'translate(' +
(node.x - bbox.width / 2) +
', ' +
(node.y -
node.height / 2 -
node.padding / 3 +
(evaluate(siteConfig.flowchart.htmlLabels) ? 5 : 3)) +
subGraphTitleTopMargin +
')'
`translate(${node.x - bbox.width / 2}, ${
node.y -
node.height / 2 -
node.padding / 3 +
(evaluate(siteConfig.flowchart.htmlLabels) ? 5 : 3) +
subGraphTitleTopMargin
})`
);

const rectBox = rect.node().getBBox();
Expand Down

0 comments on commit 96ac236

Please sign in to comment.