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

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

2 Answers 121 Views
Diagram
This is a migrated thread and some comments may be shown as answers.
Jeremiah
Top achievements
Rank 2
Jeremiah asked on 07 Aug 2014, 06:11 PM
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 Answers, 1 is accepted

Sort by
0
Accepted
Daniel
Telerik team
answered on 11 Aug 2014, 01:02 PM
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!
 
0
Jeremiah
Top achievements
Rank 2
answered on 11 Aug 2014, 02:59 PM
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. 
Tags
Diagram
Asked by
Jeremiah
Top achievements
Rank 2
Answers by
Daniel
Telerik team
Jeremiah
Top achievements
Rank 2
Share this question
or