Dear Support:
We don’t store link routes in our persisted files (to reduce source control merging issues), so they’re all computed when the diagram is loaded. However, we’d like it to be the case that what the user sees on the diagram always represents what they would see if they saved and restored the file.
In order to accomplish this, we’ve added this diagram listener:
// Arrange that all links are redrawn when anything is moved.
myDiagram.addDiagramListener("SelectionMoved", () => {
myDiagram.links.each(function(l) { l.invalidateRoute(); });
});
This seems to work properly; anytime anything is moved, all links that may be affected are redrawn.
Is this the right way to approach the problem and do you have comments regarding this?
Thank you.