@mermaid-editor-sdk/headless / addClassRelation
Function: addClassRelation()
addClassRelation(
source,from,to,operator?):string
Defined in: source/class-mutations.ts:199
Adds a relationship between two classes.
Parameters
| Parameter | Type | Default value | Description |
|---|---|---|---|
source | string | — | Mermaid source to inspect or update. |
from | string | — | Source element identifier. |
to | string | — | Target element identifier. |
operator? | ClassRelationOperator | '-->' | Mermaid relationship or edge operator. |
Returns
string