mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-10-13 11:09:39 +02:00
fix: increase the radius and remove border for rounded rect
on-behalf-of: @Mermaid-Chart <hello@mermaidchart.com>
This commit is contained in:
@@ -98,13 +98,15 @@ export async function roundedRect<T extends SVGGraphicsElement>(
|
|||||||
|
|
||||||
const w = (node?.width ? node?.width : bbox.width) + labelPaddingX * 2;
|
const w = (node?.width ? node?.width : bbox.width) + labelPaddingX * 2;
|
||||||
const h = (node?.height ? node?.height : bbox.height) + labelPaddingY * 2;
|
const h = (node?.height ? node?.height : bbox.height) + labelPaddingY * 2;
|
||||||
const radius = 5;
|
const radius = 15;
|
||||||
const taper = 5; // Taper width for the rounded corners
|
const taper = 15; // Taper width for the rounded corners
|
||||||
const { cssStyles } = node;
|
const { cssStyles } = node;
|
||||||
// @ts-expect-error -- Passing a D3.Selection seems to work for some reason
|
// @ts-expect-error -- Passing a D3.Selection seems to work for some reason
|
||||||
const rc = rough.svg(shapeSvg);
|
const rc = rough.svg(shapeSvg);
|
||||||
const options = userNodeOverrides(node, {});
|
const options = {
|
||||||
|
...userNodeOverrides(node, {}),
|
||||||
|
stroke: 'none',
|
||||||
|
};
|
||||||
if (node.look !== 'handDrawn') {
|
if (node.look !== 'handDrawn') {
|
||||||
options.roughness = 0;
|
options.roughness = 0;
|
||||||
options.fillStyle = 'solid';
|
options.fillStyle = 'solid';
|
||||||
|
Reference in New Issue
Block a user