mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-01-14 06:43:25 +08:00
chore: Minor fixes
This commit is contained in:
parent
9fc17f67c6
commit
2d241808e9
@ -54,6 +54,7 @@ presetAttributify
|
|||||||
pyplot
|
pyplot
|
||||||
redmine
|
redmine
|
||||||
rehype
|
rehype
|
||||||
|
roughjs
|
||||||
rscratch
|
rscratch
|
||||||
sparkline
|
sparkline
|
||||||
sphinxcontrib
|
sphinxcontrib
|
||||||
|
@ -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 { getConfig } from '$root/diagram-api/diagramAPI.js';
|
||||||
import { evaluate } from '$root/diagrams/common/common.js';
|
import { evaluate } from '$root/diagrams/common/common.js';
|
||||||
|
import { log } from '$root/logger.js';
|
||||||
import { getSubGraphTitleMargins } from '$root/utils/subGraphTitleMargins.js';
|
import { getSubGraphTitleMargins } from '$root/utils/subGraphTitleMargins.js';
|
||||||
|
import { select } from 'd3';
|
||||||
import rough from 'roughjs';
|
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';
|
import { createRoundedRectPathD } from './shapes/roundedRectPath.ts';
|
||||||
|
|
||||||
const rect = (parent, node) => {
|
const rect = (parent, node) => {
|
||||||
@ -71,13 +71,13 @@ const rect = (parent, node) => {
|
|||||||
if (useHtmlLabels) {
|
if (useHtmlLabels) {
|
||||||
label.attr(
|
label.attr(
|
||||||
'transform',
|
'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})`
|
`translate(${node.x - bbox.width / 2}, ${node.y - node.height / 2 + subGraphTitleTopMargin})`
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
label.attr(
|
label.attr(
|
||||||
'transform',
|
'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})`
|
`translate(${node.x}, ${node.y - node.height / 2 + subGraphTitleTopMargin})`
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
|
import type { SVG } from '$root/diagram-api/types.js';
|
||||||
import type { Mocked } from 'vitest';
|
import type { Mocked } from 'vitest';
|
||||||
import type { SVG } from '../diagram-api/types.js';
|
|
||||||
import { addEdgeMarkers } from './edgeMarker.js';
|
import { addEdgeMarkers } from './edgeMarker.js';
|
||||||
|
|
||||||
describe('addEdgeMarker', () => {
|
describe('addEdgeMarker', () => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user