Is there a way to disable auto-layout of items?

3 posts, 1 answers
  1. Jeremiah
    Jeremiah avatar
    5 posts
    Member since:
    Oct 2012

    Posted 07 Aug 2014 Link to this post

    I have a collection of items which are databound to a Diagram.  During the "visualTemplate" method I set each item's X and Y values.  After all items have been rendered to the screen, the diagram changes all of those positions using its layout functionality.  My question is how do I disable auto layout of my items on the diagram?
  2. Answer
    Daniel
    Admin
    Daniel avatar
    2117 posts

    Posted 11 Aug 2014 Link to this post

    Hello,

    The shape position cannot be set in the visualTemplate function. It is possible to use the change event to set the position. I created a small example which demonstrates setting the position from the dataItems.
    As for the layout - the diagram should not apply any layout unless a layout is specified with the configuration. If in you scenario a layout is applied without setting the layout option then please provide a runnable sample that demonstrates the problem.

    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
  4. Jeremiah
    Jeremiah avatar
    5 posts
    Member since:
    Oct 2012

    Posted 11 Aug 2014 in reply to Daniel Link to this post

    That worked perfectly.  I initially had the layout bound to some properties on my view model but if you specify NULL for them you will get undesirable behavior.  Since I don't need the layout functionality at this moment, it will work great.  Thank you for your time. 
Back to Top