Hello,
I would like to insert a temporary link between two nodes programmatically, i.e. the link should be visible, but not be added to the model and not be included in the undo manager.
The temporary link will be removed programmatically triggered by a user action, or at latest when our app is closed (as the link is not persisted in the model).
Background is that we want to suggest the user to add a link between two nodes, and the user can accept or discard the suggestion.
How can I add a link (temporarily) to the diagram but not to the model?
I tried to add it to a temporary layer, but I couldn’t find an option to specify the layer in LinkingTool.insertLink(). Also, I am not sure if it will work if the link is in another layer than it’s connected nodes?
What would be the best way to do this?