Inserting node into link

Forgive me if this is already covered in the manual or in this forum.

After establishing a link between two nodes, is it possible to insert a new node into the link, between the two nodes, such that the final result is two links between 3 nodes?


There isn’t any built-in function, but it’s easy enough to do. Say that you have A—>C and you want A—>B—>C

assign link 1 to point to B, create a new link and connect it from B to C.

Flowgrammer has a “drop node on link” behavior, and the code in InsertNodeOnLink implements that.

Many thanks, that makes sense.
Another quick question: can the text associated with a node or link be selected and manually moved by the user (for clariety)? This would be important for diagrams that have multiple nodes/links in close proximity of each other.

Yes, you can use the LinkLabel class that is in the Processor sample. To use that class, you also need to add some methods to your GoLabeledLink-inheriting class, which is FlowLink in the Processor sample.

That LinkLabel class inherits from GoText, so you can of course customize it to meet your needs. Or you could inherit from some other class such as GoGroup, if you need your labels to be more complicated than just some text.

The FlowLink class also has a bunch of customization that you might not need, but you can easily strip out those methods.