Fix odd (asymmetrical) shape & hexagon shape neo look for flowchart

This commit is contained in:
Ashish Jain
2024-06-18 14:51:14 +02:00
parent 92e6f52168
commit 0d630862ee
3 changed files with 13 additions and 6 deletions

View File

@@ -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}}
</pre
@@ -95,7 +98,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}}
</pre

View File

@@ -28,7 +28,8 @@ export const hexagon = async (parent: SVGAElement, node: Node): Promise<SVGAElem
const { shapeSvg, bbox } = await labelHelper(parent, node, getNodeClasses(node));
const f = 4;
const h = bbox.height + node.padding;
const labelPaddingX = node.look === 'neo' ? node.padding * 2 : node.padding;
const h = bbox.height + labelPaddingX;
const m = h / f;
const w = bbox.width + 2 * m + node.padding;
const points = [

View File

@@ -21,9 +21,9 @@ export const rect_left_inv_arrow = async (
node: Node
): Promise<SVGAElement> => {
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 },