Connector positioning for custom shapes

2 posts, 0 answers
  1. Itai
    Itai avatar
    33 posts
    Member since:
    Feb 2016

    Posted 07 Apr Link to this post

    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. 

  2. Daniel
    Admin
    Daniel avatar
    2117 posts

    Posted 11 Apr Link to this post

    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!
     
  3. Kendo UI is VS 2017 Ready
Back to Top