Link/Node overlap

I got the problem, that if I edit many things in my programm that GoLabeledLink-Labels are overlapped by nodes,

so the user won’t be able to read the text.



Is there any sample or application which moves the links

that way that there could be no overlap?



It should be a switch in my programme to let the user choose whether this is allowed or not…

I don’t know what I did wrong but:



tell me please, why didn’t you answer this topic of me?

Perhaps no one had any good suggestions.
The best I can offer at this time is to use the movable LinkLabel class (and corresponding support in FlowLink) of the Processor sample. Then you could have a separate step that iterated over all the LinkLabels and, if they overlap any nodes, to move them so that they don’t overlap any nodes.
Doing this well in the general case isn’t easy, and depends on your application and your requirements. The next version of GoDiagram does offer a GoDocument.IsUnoccupied predicate that may be of help in finding a place for an object. However, you would still need to determine an adequate algorithm for finding an acceptable unoccupied spot.

Your suggestion is what I’ve already done. I surely used the movable linkLabel class, because that whas what I needed first to give the user the possibility to prevent the overlapping by himself.



And yes, you already suggested using GoDocument.IsUnoccupied to doing this.



But there’s still left the problem how to move the labels or the nodes (or both) in a way that they won’t overlap any longer.



The only way I could think of, would be to move them in a circular way. Somehow getting the center of the selection and then move them in a radian way out of the range.



Or it could be like drawing a line through the center and

the overlapping node and move it along that line, since there could be no other object picked again.



Would that be any suggestion? But I don’t know how to realize this at its best.



AutoLayout would not be a solution to this.