mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-10 02:49:40 +02:00
18 lines
553 B
TypeScript
18 lines
553 B
TypeScript
import type { Node, RectOptions } from '$root/rendering-util/types.d.ts';
|
|
import { drawRect } from './drawRect.js';
|
|
import { getConfig } from '$root/diagram-api/diagramAPI.js';
|
|
|
|
export const roundedRect = async (parent: SVGAElement, node: Node) => {
|
|
const { look } = getConfig();
|
|
node.look = look;
|
|
const options = {
|
|
rx: node.look === 'neo' ? 1 : 5,
|
|
ry: node.look === 'neo' ? 1 : 5,
|
|
labelPaddingX: node.padding * 2,
|
|
labelPaddingY: node.padding * 1,
|
|
classes: '',
|
|
} as RectOptions;
|
|
|
|
return drawRect(parent, node, options);
|
|
};
|