From 0d630862ee227f93cd578f1e9143cbd93ab8ba2c Mon Sep 17 00:00:00 2001 From: Ashish Jain Date: Tue, 18 Jun 2024 14:51:14 +0200 Subject: [PATCH] Fix odd (asymmetrical) shape & hexagon shape neo look for flowchart --- cypress/platform/ash.html | 10 ++++++++-- .../rendering-elements/shapes/hexagon.ts | 3 ++- .../rendering-elements/shapes/rectLeftInvArrow.ts | 6 +++--- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/cypress/platform/ash.html b/cypress/platform/ash.html index f28a2a72f..bcad21c95 100644 --- a/cypress/platform/ash.html +++ b/cypress/platform/ash.html @@ -80,7 +80,10 @@ flowchart node id1([This is the text in the box]) id2((circle)) - id1(((double circle))) + id3(((double circle))) + id4>Asymetrical] + id5{This is the text in the box} + id6{{This is the text in the box}} Asymetrical] + id5{This is the text in the box} + id6{{This is the text in the box}} => { const { shapeSvg, bbox } = await labelHelper(parent, node, getNodeClasses(node)); - - const w = bbox.width + node.padding; - const h = bbox.height + node.padding; + const labelPadding = node.look === 'neo' ? node.padding * 2 : node.padding; + const w = bbox.width + labelPadding; + const h = bbox.height + labelPadding; const points = [ { x: -h / 2, y: 0 }, { x: w, y: 0 },