New to Kendo UI for Angular? Start a free 30-day trial

Axis Lock

You can use the DragTarget directive to restrict the drag either to the horizontal or vertical axis. To implement the axis restriction, set the restrictByAxis property.

Restriction by axis is only applicable when the drag mode is set to auto. In manual mode the developer has full control over the drag action.

The following example demonstrates locking the element to be dragged horizontally or vertically only.

View Source
Change Theme:

In this article

Not finding the help you need?