Added per link styling

Edited flowDB.ts which already had interpolate for styling links
individually. Added the ability to modify this parameter using the
newer @ syntax using the curve property.
This commit is contained in:
SpecularAura
2025-07-09 20:55:34 +00:00
parent fad6676d18
commit b3a12237c0
2 changed files with 16 additions and 0 deletions

View File

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

View File

@@ -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';