New to Telerik UI for ASP.NET MVC? Download free 30-day trial

DiagramEditableDragSettingsBuilder

Methods

Snap(System.Boolean)

Specifies the shapes drag snap options. By default, during dragging, the shapes move by a given number of pixels at once. You can disable this behavior to make shapes movement smooth or you can specify a different number for the drag snap size to simulate a snap-to-grid functionality.

Parameters

enabled - System.Boolean

The value that enables or disables the snap option.

Example


             @(Html.Kendo().Diagram()
                .Name("diagram")
                .Editable(e => e.Drag(drag => drag.Snap(false)))
              )

Snap(System.Action)

Specifies the shapes drag snap options. By default, during dragging, the shapes move by a given number of pixels at once. You can disable this behavior to make shapes movement smooth or you can specify a different number for the drag snap size to simulate a snap-to-grid functionality.

Parameters

configurator - System.Action<DiagramEditableDragSnapSettingsBuilder>

The action that configures the snap settings.

Example


             @(Html.Kendo().Diagram()
                .Name("diagram")
                .Editable(e => e.Drag(drag => drag.Snap(s => s.Size(80))))
              )

In this article
Not finding the help you need?