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

Move shapes finer

1 Answer 60 Views
Diagram
This is a migrated thread and some comments may be shown as answers.
User1564
Top achievements
Rank 1
Veteran
User1564 asked on 18 Nov 2020, 01:32 PM

Hello Telerik-Team,

I am using RadDiagram to move shapes on a picture. My issue is if I move shapes, i can't place it on exact position like I want.

Is there a possibility to move the shapes finer?

Regards

1 Answer, 1 is accepted

Sort by
0
Vessy
Telerik team
answered on 23 Nov 2020, 11:00 AM

Hi,

You can make the shape moving finer by configuring editable.drag.snap.size value of the diagram (the default value is 10):

You can do it through the underlying Kendo UI widget of the control:

        <script>
            function diagramLoad(diagram, args) {
                var options = { editable: { drag: { snap: { size: 1} } } };
                var diagramWidget = diagram.get_kendoWidget();
                diagramWidget.setOptions(options);
            }
        </script>
        <telerik:RadDiagram ID="RadDiagram1" runat="server">
            <LayoutSettings Enabled="true" Type="Tree" Subtype="Right"></LayoutSettings>
            <ClientEvents OnLoad="diagramLoad"/>
            <ShapesCollection>
                <telerik:DiagramShape Id="s1">
                </telerik:DiagramShape>
                <telerik:DiagramShape Id="s2">
                </telerik:DiagramShape>
            </ShapesCollection>
            <ConnectionsCollection>
                <telerik:DiagramConnection>
                    <FromSettings ShapeId="s1" />
                    <ToSettings ShapeId="s2" />
                </telerik:DiagramConnection>
            </ConnectionsCollection>
        </telerik:RadDiagram>

 

Regards,
Vessy
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
Diagram
Asked by
User1564
Top achievements
Rank 1
Veteran
Answers by
Vessy
Telerik team
Share this question
or