Edges
Preview version
The jsMind V2 programming API is currently a preview. The API will change in later updates. Please check this documentation anytime for the interface that is current.
Additional relationships between nodes. Parent-child structure is not represented as an edge.
This page is generated from the published typings dist/jsmind.d.ts with TypeDoc.
JmEdge
Class
Edge of mind map.
Remarks
Edges represent additional relationships between nodes (not parent-child relationships).
Constructor
constructor(id: string, sourceNodeId: string, targetNodeId: string, type: "link", label?: string | null)Creates a new edge.
Throws
JsMindErrorIf any of the required parameters are invalid.
Parameters
| Name | Type | Description |
|---|---|---|
id | string | The unique identifier of the edge. |
sourceNodeId | string | The ID of the source node. |
targetNodeId | string | The ID of the target node. |
type | "link" | The type of the edge. |
label (optional) | string | null | Optional label for the edge. |
id
id: stringThe unique identifier of the edge.
label
label: string | nullThe optional label of the edge.
sourceNodeId
sourceNodeId: stringThe ID of the source node.
style
style?: JmLineStyleVisual style of the edge line.
Remarks
Uses the same JmLineStyle as JmNodeStyle.incoming so that hierarchical and additional relationships share one vocabulary.
targetNodeId
targetNodeId: stringThe ID of the target node.
type
type: "link"The type of the edge.
JmEdgeType
Enumeration
Type of edge - only for additional relationships (not parent-child).
Members
| Name | Value | Description |
|---|---|---|
Link | "link" | Link edge type. |
EdgeCreationOptions
Interface
Options for creating a new edge.
Properties
| Name | Type | Description |
|---|---|---|
edgeId (optional) | string | Optional edge ID, will be generated if not provided. |
label (optional) | string | Optional label for the edge. |
style (optional) | JmLineStyle | Optional visual style for the edge line. |