This is a migrated thread and some comments may be shown as answers.

Orthogonal connections with connection points.

1 Answer 90 Views
Diagram
This is a migrated thread and some comments may be shown as answers.
Victors
Top achievements
Rank 1
Victors asked on 23 Jul 2020, 01:01 PM

All connections in my project should be orthogonal. I have two type of connection in my project.

  1. Routed connections.
  2. Connections with manually set connection points (“manual connections”).

I use: AStarRouter and WallOptimization = true.

 

Problem: When I move a shape with „manual connections", this connection is not orthogonal.
Question: Is there a way to keep connections orthogonal and keep connection points?

1 Answer, 1 is accepted

Sort by
0
Petar Mladenov
Telerik team
answered on 27 Jul 2020, 04:25 PM

Hello Victors,

The diagram routing of RadDiagram works the following way - by a given start and end point, it returns a list of points which will define the geometry of the connection. The well-known AStarRouter of Diagram can minimize shapes crossing, connection segment overlapping etc. However, all routers entirely replace the connection and does not change the connection if user has defined custom connection points (for example with Ctrl + Mouse over the connection). In this case connection is in Modified state (IsModified = true). 

This seems to me a complex requirement (also an interesting math problem - optimal path which goes through fixed points). To achieve your requirement, you can implement your own custom router.  In the GetRoutePoints method you need to return a list which always contains your fixed points. 

Regards,
Petar Mladenov
Progress Telerik

Tags
Diagram
Asked by
Victors
Top achievements
Rank 1
Answers by
Petar Mladenov
Telerik team
Share this question
or