Create Editor for Link to Link



Please advice, Can you give me an example about creating editor for link to link diagram in gojs? In that editor we can edit drag and drop and connect a line between a node diagram to another.

Thank you.


Have you seen this sample: ?

The first crucial step is to make sure that you have set

Note how the sample defines a “LinkLabel” node template that has a port element that is fromLinkable and toLinkable. Note how the model includes a "category":"LinkLabel" node data for each link data.

Note the use of so that each newly drawn link automatically has its own new label node.

The sample has two different link templates, but you don’t need to do that unless you really want to. If you don’t want to use a different link template for links that connect with links, you can delete the maybeChangeLinkCategory and its uses.