mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-25 18:30:10 +02:00
Merge from Upstream & fix version
This commit is contained in:
@@ -34,10 +34,10 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/d3": "^7.4.3",
|
||||
"mermaid": "workspace:^"
|
||||
"@mermaid-chart/mermaid": "workspace:^"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"mermaid": "^11.0.0"
|
||||
"@mermaid-chart/mermaid": "^11.0.0"
|
||||
},
|
||||
"files": [
|
||||
"dist"
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "mermaid",
|
||||
"version": "11.0.2",
|
||||
"name": "@mermaid-chart/mermaid",
|
||||
"version": "11.0.2-b.1",
|
||||
"description": "Markdown-ish syntax for generating flowcharts, mindmaps, sequence diagrams, class diagrams, gantt charts, git graphs and more.",
|
||||
"type": "module",
|
||||
"module": "./dist/mermaid.core.mjs",
|
||||
|
@@ -14,13 +14,12 @@ export const rect_left_inv_arrow = async (
|
||||
const { labelStyles, nodeStyles } = styles2String(node);
|
||||
node.labelStyle = labelStyles;
|
||||
const { shapeSvg, bbox } = await labelHelper(parent, node, getNodeClasses(node));
|
||||
const labelPaddingX = node.look === 'neo' ? node.padding * 3 : node.padding;
|
||||
const labelPaddingY = node.look === 'neo' ? node.padding * 1.5 : node.padding;
|
||||
const nodePadding = node.padding ?? 0;
|
||||
const labelPaddingX = node.look === 'neo' ? nodePadding * 3 : node.padding;
|
||||
const labelPaddingY = node.look === 'neo' ? nodePadding * 1.5 : node.padding;
|
||||
|
||||
const { shapeSvg, bbox, label } = await labelHelper(parent, node, getNodeClasses(node));
|
||||
|
||||
const w = Math.max(bbox.width + (labelPaddingY ?? 0), node?.width ?? 0);
|
||||
const h = Math.max(bbox.height + (labelPaddingX ?? 0), node?.height ?? 0);
|
||||
const w = Math.max(bbox.width + labelPaddingY, node?.width ?? 0);
|
||||
const h = Math.max(bbox.height + labelPaddingX, node?.height ?? 0);
|
||||
|
||||
const x = -w / 2;
|
||||
const y = -h / 2;
|
||||
|
Reference in New Issue
Block a user