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

RadDiagram by-step routing

1 Answer 47 Views
Diagram
This is a migrated thread and some comments may be shown as answers.
Svetlana
Top achievements
Rank 1
Svetlana asked on 18 Feb 2019, 11:58 AM

Hi!

I would like to implement step by step routing not shape to shape like that:

- click on shape's connector

- click some points on diagram

- finally click another shape's connector

Clicks are marked as red circle in attechement 0.png. Is it possible and where should I start?

Another short question is about moving connection. Is there a way to avoid displacement of rigth angle between shape's connector and the first connection point? See illustration in attachement 1.png.

 

1 Answer, 1 is accepted

Sort by
0
Petar Mladenov
Telerik team
answered on 20 Feb 2019, 10:02 AM
Hello Svetlana,

Let me first note that you are able to add intermediate points to a connection by Ctrl + Click. Then you can move the added points to control the connection geometry.
Your custom requirements - 1) Segment-by-segment connection creation and 2) avoiding non horizontal /vertical segments require custom connection tool. By default tools in RadDiagram handle the 3 mouse events Down, Move, Up and activate diagram services' methods. You can start with the following resources:

Diagram Tools Overview
Diagram Tools Customizaiton
Diagram Custom Tools SDK
Diagram Custom Connector Tools SDK

Also in the attached project "Diagrams-ConnectionManipulation" you can see how segment dragging is implemented, simulating VISIO behavior.
In the WpfApplication I have done the following:
- CustomConnectionTool which inherits from PrimaryMouseToolBase is created and it replaces the default Connection Tool
        - the code of the custom tool is 1:1 compared to ConnectionTool is Diagram. My Idea was to give you the complete overview of what connection tool does, allowing you to plug your logic more easily. If you end up with simpler solution, you can consider inheriting ConnectionTool (if possible and you don't need PrimaryMouseToolBase methods).

Regards,
Petar Mladenov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
Diagram
Asked by
Svetlana
Top achievements
Rank 1
Answers by
Petar Mladenov
Telerik team
Share this question
or