mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-08 18:16:44 +02:00
Fix odd (asymmetrical) shape & hexagon shape neo look for flowchart
This commit is contained in:
@@ -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
|
||||
|
@@ -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 = [
|
||||
|
@@ -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 },
|
||||
|
Reference in New Issue
Block a user