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

Connector positioning for custom shapes

1 Answer 164 Views
Diagram
This is a migrated thread and some comments may be shown as answers.
Itai
Top achievements
Rank 1
Itai asked on 07 Apr 2016, 12:17 PM

I have a diagram with custom shapes, and I want to position the connectors accordingly. I have not found any examples for positioning connectors, and the API reference has the very unhelpful: 

connectors.position Function
The function that positions the connector.

 

So what are the parameters (if any) this function takes? What should it return? The Point object where I want the connector the be located (relative to the shape)? 

 

For reference, my custom shape has the SVG path: 'M 20 0 L 190 0 L 170 60 L 0 60 z' (a rhombus), and I want the left and right connectors to be on the diagonal lines, not floating. 

1 Answer, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 11 Apr 2016, 10:30 AM
Hi,

The position function is passed a shape as parameter and expects a Point with the connector position as result. We will update the documentation to indicate this. An example demonstrating using custom position handler is available in the connectors option examples.

Regards,
Daniel
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Diagram
Asked by
Itai
Top achievements
Rank 1
Answers by
Daniel
Telerik team
Share this question
or