Skip to main content

Links overview

Links are special shapes which you can use to connect different shapes between each other. JointJS provides extensive links customization, allowing you to create any configuration of desired end points of the link as well as the connection line itself. The base model for links is dia.Link while its base view is represented by dia.LinkView class.

dia.Link is a base model for diagram elements. It inherits from dia.Cell with several additional model attributes and methods specific to links.

You can find extensive list and description of model attributes specific to link in the following section.

dia.LinkView​

The view for the dia.Link model. It inherits from dia.CellView and is responsible for:

  • Rendering a link inside a paper
  • Handling the link's pointer events
  • Providing various methods for working with the link (visually)

To find the view associated with a specific link model, use the paper.findViewByModel() method:

const linkView = paper.findViewByModel(link);
// const linkView = link.findView(paper); // alternatively

Stay in the know

Be where thousands of diagramming enthusiasts meet

Star us on GitHub