mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-08-15 06:19:24 +02:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
|
@@ -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';
|
||||
|
||||
|
Reference in New Issue
Block a user