Example of Snapping in Blazor Diagram Component

Diagram / Interactive Features / Snapping

This sample shows how the diagram objects snap to the nearest intersection of gridlines or objects while being dragged or resized.

Loading Syncfusion Blazor Server Demos…

Properties
Snapping Interval
Snapping Angle
Snapping Line Color

Constraints

The gridline position toward which the diagram object snaps can be customized by using the SnapIntervals property of the HorizontalGridLines and VerticalGridLines, specifying a set of intervals for snapping the objects. The SnapAngle property allows you to define the angle to which the object needs to be rotated. The SnapLineStyle property allows you to customize the style of the snap line. The Constraints property controls the visibility of gridlines and enables or disables snapping. The horizontal and vertical gridlines are displayed when restrictions are set to ShowLines. If the constraint is set to SnapToLines, the object snaps to both the vertical and horizontal gridlines. With SnapToObject, it jumps to line up with the closest element when you move or resize an element.

Transform your Blazor web apps today with Syncfusion® Blazor components
100+ high-performance and responsive UI components
Dedicated support
Hassle-free licensing
TRY IT FOR FREE