mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-11-03 12:25:22 +01:00
added neo-fication for curvedTrapezoid shape
This commit is contained in:
@@ -34,8 +34,11 @@ export const curvedTrapezoid = async (parent: SVGAElement, node: Node) => {
|
||||
node.labelStyle = labelStyles;
|
||||
const { shapeSvg, bbox } = await labelHelper(parent, node, getNodeClasses(node));
|
||||
const widthMultiplier = bbox.width < 15 ? 2 : 1.25;
|
||||
const w = (bbox.width + node.padding) * widthMultiplier;
|
||||
const h = bbox.height + node.padding;
|
||||
const nodePadding = node.padding ?? 0;
|
||||
const labelPaddingX = node.look === 'neo' ? nodePadding * 2 : nodePadding;
|
||||
const labelPaddingY = node.look === 'neo' ? nodePadding * 1 : nodePadding;
|
||||
const w = Math.max((bbox.width + labelPaddingX) * widthMultiplier, node?.width ?? 500);
|
||||
const h = Math.max(bbox.height + labelPaddingY, node?.height ?? 100);
|
||||
const radius = h / 2;
|
||||
|
||||
const { cssStyles } = node;
|
||||
|
||||
Reference in New Issue
Block a user