diff --git a/packages/mermaid/src/diagrams/flowchart/flowDb.ts b/packages/mermaid/src/diagrams/flowchart/flowDb.ts index 65f8c4a05..b729a85e0 100644 --- a/packages/mermaid/src/diagrams/flowchart/flowDb.ts +++ b/packages/mermaid/src/diagrams/flowchart/flowDb.ts @@ -139,6 +139,9 @@ export class FlowDB implements DiagramDB { if (edgeDoc?.animation !== undefined) { edge.animation = edgeDoc.animation; } + if (edgeDoc?.curve !== undefined) { + edge.interpolate = edgeDoc.curve; + } return; } diff --git a/packages/mermaid/src/types.ts b/packages/mermaid/src/types.ts index fdccae677..d1394e71b 100644 --- a/packages/mermaid/src/types.ts +++ b/packages/mermaid/src/types.ts @@ -16,6 +16,19 @@ export interface NodeMetaData { export interface EdgeMetaData { animation?: 'fast' | 'slow'; animate?: boolean; + curve?: + | 'basis' + | 'bumpX' + | 'bumpY' + | 'cardinal' + | 'catmullRom' + | 'linear' + | 'monotoneX' + | 'monotoneY' + | 'natural' + | 'step' + | 'stepAfter' + | 'stepBefore'; } import type { MermaidConfig } from './config.type.js';