Skip to content

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 ​

ts
constructor(id: string, sourceNodeId: string, targetNodeId: string, type: "link", label?: string | null)

Creates a new edge.

Throws

  • JsMindError If any of the required parameters are invalid.

Parameters

NameTypeDescription
idstringThe unique identifier of the edge.
sourceNodeIdstringThe ID of the source node.
targetNodeIdstringThe ID of the target node.
type"link"The type of the edge.
label (optional)string | nullOptional label for the edge.

id ​

ts
id: string

The unique identifier of the edge.

label ​

ts
label: string | null

The optional label of the edge.

sourceNodeId ​

ts
sourceNodeId: string

The ID of the source node.

style ​

ts
style?: JmLineStyle

Visual style of the edge line.

Remarks

Uses the same JmLineStyle as JmNodeStyle.incoming so that hierarchical and additional relationships share one vocabulary.

targetNodeId ​

ts
targetNodeId: string

The ID of the target node.

type ​

ts
type: "link"

The type of the edge.

JmEdgeType ​

Enumeration

Type of edge - only for additional relationships (not parent-child).

Members

NameValueDescription
Link"link"Link edge type.

EdgeCreationOptions ​

Interface

Options for creating a new edge.

Properties

NameTypeDescription
edgeId (optional)stringOptional edge ID, will be generated if not provided.
label (optional)stringOptional label for the edge.
style (optional)JmLineStyleOptional visual style for the edge line.

本文档由 AI 协助生成 / This documentation was prepared with AI assistance