mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-16 13:59:54 +02:00
MC-1730 Fix for subroutine shape
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@mermaid-chart/mermaid",
|
"name": "@mermaid-chart/mermaid",
|
||||||
"version": "11.0.0-b.58",
|
"version": "11.0.0-b.59",
|
||||||
"description": "Markdown-ish syntax for generating flowcharts, sequence diagrams, class diagrams, gantt charts and git graphs.",
|
"description": "Markdown-ish syntax for generating flowcharts, sequence diagrams, class diagrams, gantt charts and git graphs.",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"module": "./dist/mermaid.core.mjs",
|
"module": "./dist/mermaid.core.mjs",
|
||||||
|
@@ -65,6 +65,7 @@ export const subroutine = async (parent: SVGAElement, node: Node) => {
|
|||||||
];
|
];
|
||||||
|
|
||||||
if (node.look === 'handdrawn' || (node.look === 'neo' && !useGradient)) {
|
if (node.look === 'handdrawn' || (node.look === 'neo' && !useGradient)) {
|
||||||
|
console.log('OXE points 1', points);
|
||||||
// @ts-ignore - rough is not typed
|
// @ts-ignore - rough is not typed
|
||||||
const rc = rough.svg(shapeSvg);
|
const rc = rough.svg(shapeSvg);
|
||||||
const options = userNodeOverrides(node, {});
|
const options = userNodeOverrides(node, {});
|
||||||
@@ -72,8 +73,6 @@ export const subroutine = async (parent: SVGAElement, node: Node) => {
|
|||||||
if (node.look === 'neo') {
|
if (node.look === 'neo') {
|
||||||
options.roughness = 0;
|
options.roughness = 0;
|
||||||
options.fillStyle = 'solid';
|
options.fillStyle = 'solid';
|
||||||
// options.stroke = 'none';
|
|
||||||
// options.strokeWidth = 0
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const roughNode = rc.rectangle(x - 8, y, w + 16, h, options);
|
const roughNode = rc.rectangle(x - 8, y, w + 16, h, options);
|
||||||
@@ -87,7 +86,9 @@ export const subroutine = async (parent: SVGAElement, node: Node) => {
|
|||||||
let rect = shapeSvg.insert(() => roughNode, ':first-child');
|
let rect = shapeSvg.insert(() => roughNode, ':first-child');
|
||||||
const { cssStyles } = node;
|
const { cssStyles } = node;
|
||||||
rect.attr('class', 'basic label-container').attr('style', cssStyles);
|
rect.attr('class', 'basic label-container').attr('style', cssStyles);
|
||||||
|
updateNodeBounds(node, rect);
|
||||||
} else {
|
} else {
|
||||||
|
console.log('OXE points 2', points);
|
||||||
const el = insertPolygonShape(shapeSvg, w, h, points);
|
const el = insertPolygonShape(shapeSvg, w, h, points);
|
||||||
if (nodeStyles) {
|
if (nodeStyles) {
|
||||||
el.attr('style', nodeStyles);
|
el.attr('style', nodeStyles);
|
||||||
|
Reference in New Issue
Block a user