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

@@ -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 },