Skip to main content
Version: 4.3

ConnectionEnd

One end (source or target) of a link: the cell it attaches to and the exact port or magnet within that cell. Shared by ValidateConnectionParams and emitted on link:connect / link:disconnect events, so validation and event payloads describe a connection the same way.

Properties

id

readonly id: ID;

ID of the cell this end attaches to.


magnet

readonly magnet: Element | null;

The SVG magnet node the end attaches to, or null when attaching to the cell's root.


model

readonly model: Cell;

The cell model (element or link) this end attaches to.


port

readonly port: string | null;

ID of the port the end attaches to, or null when it attaches to the cell body.


selector

readonly selector: string | null;

Value of the magnet's joint-selector attribute, or null when it has none.

Stay in the know

Be where thousands of diagramming enthusiasts meet

Star us on GitHub