added neo-fication for curvedTrapezoid shape

This commit is contained in:
omkarht
2024-09-09 18:54:43 +05:30
parent 13b96ad6c0
commit 040a989c3d

View File

@@ -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;