From 2d241808e90d03dc9bb56a2fd52c2630aa7b8ef0 Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Wed, 15 May 2024 21:23:33 +0530 Subject: [PATCH] chore: Minor fixes --- .cspell/libraries.txt | 1 + .../rendering-util/rendering-elements/clusters.js | 14 +++++++------- .../rendering-elements/edgeMarker.spec.ts | 2 +- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.cspell/libraries.txt b/.cspell/libraries.txt index 9d2926186..ed01e539a 100644 --- a/.cspell/libraries.txt +++ b/.cspell/libraries.txt @@ -54,6 +54,7 @@ presetAttributify pyplot redmine rehype +roughjs rscratch sparkline sphinxcontrib diff --git a/packages/mermaid/src/rendering-util/rendering-elements/clusters.js b/packages/mermaid/src/rendering-util/rendering-elements/clusters.js index ba60d4e44..8c422cee2 100644 --- a/packages/mermaid/src/rendering-util/rendering-elements/clusters.js +++ b/packages/mermaid/src/rendering-util/rendering-elements/clusters.js @@ -1,12 +1,12 @@ -import intersectRect from '../rendering-elements/intersect/intersect-rect.js'; -import { log } from '$root/logger.js'; -import createLabel from './createLabel.js'; -import { createText } from '../createText.ts'; -import { select } from 'd3'; import { getConfig } from '$root/diagram-api/diagramAPI.js'; import { evaluate } from '$root/diagrams/common/common.js'; +import { log } from '$root/logger.js'; import { getSubGraphTitleMargins } from '$root/utils/subGraphTitleMargins.js'; +import { select } from 'd3'; import rough from 'roughjs'; +import { createText } from '../createText.ts'; +import intersectRect from '../rendering-elements/intersect/intersect-rect.js'; +import createLabel from './createLabel.js'; import { createRoundedRectPathD } from './shapes/roundedRectPath.ts'; const rect = (parent, node) => { @@ -71,13 +71,13 @@ const rect = (parent, node) => { if (useHtmlLabels) { label.attr( 'transform', - // This puts the labal on top of the box instead of inside it + // This puts the label on top of the box instead of inside it `translate(${node.x - bbox.width / 2}, ${node.y - node.height / 2 + subGraphTitleTopMargin})` ); } else { label.attr( 'transform', - // This puts the labal on top of the box instead of inside it + // This puts the label on top of the box instead of inside it `translate(${node.x}, ${node.y - node.height / 2 + subGraphTitleTopMargin})` ); } diff --git a/packages/mermaid/src/rendering-util/rendering-elements/edgeMarker.spec.ts b/packages/mermaid/src/rendering-util/rendering-elements/edgeMarker.spec.ts index 6cfb59fab..266883a47 100644 --- a/packages/mermaid/src/rendering-util/rendering-elements/edgeMarker.spec.ts +++ b/packages/mermaid/src/rendering-util/rendering-elements/edgeMarker.spec.ts @@ -1,5 +1,5 @@ +import type { SVG } from '$root/diagram-api/types.js'; import type { Mocked } from 'vitest'; -import type { SVG } from '../diagram-api/types.js'; import { addEdgeMarkers } from './edgeMarker.js'; describe('addEdgeMarker', () => {