updated inverted trapezoid

This commit is contained in:
omkarht
2024-08-26 19:49:29 +05:30
parent cb91c3f8a8
commit 9d9109a68c

View File

@@ -28,8 +28,9 @@ export const inv_trapezoid = async (parent: SVGAElement, node: Node): Promise<SV
node.labelStyle = labelStyles; node.labelStyle = labelStyles;
const { shapeSvg, bbox } = await labelHelper(parent, node, getNodeClasses(node)); const { shapeSvg, bbox } = await labelHelper(parent, node, getNodeClasses(node));
const w = bbox.width + node.padding; const w = Math.max(bbox.width + (node.padding ?? 0) * 2, node?.width ?? 0);
const h = bbox.height + node.padding; const h = Math.max(bbox.height + (node.padding ?? 0) * 2, node?.height ?? 0);
const points = [ const points = [
{ x: 0, y: 0 }, { x: 0, y: 0 },
{ x: w, y: 0 }, { x: w, y: 0 },