mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-21 00:09:51 +02:00
Fix odd (asymmetrical) shape & hexagon shape neo look for flowchart
This commit is contained in:
@@ -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