Class ResizeController
Represents a controller that provides functionality for scaling and resizing selected objects in a diagram.
Inherited Members
Namespace: Syncfusion.Blazor.Diagram
Assembly: Syncfusion.Blazor.dll
Syntax
public class ResizeController : InteractionControllerBase
Remarks
The ResizeController handles user interactions for resizing diagram elements through resize handles. It provides real-time visual feedback and supports various resize modes including uniform scaling and aspect ratio preservation.
Constructors
ResizeController(SfDiagramComponent, DiagramElementAction)
Initializes a new instance of the ResizeController class with the specified diagram component and resize action.
Declaration
public ResizeController(SfDiagramComponent diagram, DiagramElementAction corner)
Parameters
Type | Name | Description |
---|---|---|
SfDiagramComponent | diagram | The SfDiagramComponent instance to be controlled. Cannot be null. |
DiagramElementAction | corner | The DiagramElementAction resize type. RowResize converts to ResizeSouth, ColumnResize converts to ResizeEast. |
Remarks
Handles diagram element resizing with real-time visual feedback and multiple resize modes.
Automatically normalizes row and column resize actions to directional resize actions.
Methods
OnMouseDown(DiagramMouseEventArgs)
Handles the mouse down event that occurs when the user presses the mouse button over a selector resize handle in the SfDiagramComponent.
Declaration
public override void OnMouseDown(DiagramMouseEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
DiagramMouseEventArgs | args | A DiagramMouseEventArgs containing mouse event information. |
Overrides
Remarks
Initiates the resize operation by capturing the initial mouse position and preparing resize handles for interaction.
Invoked when a mouse down event occurs over a resize handle.
OnMouseLeave(DiagramMouseEventArgs)
Handles the mouse leave event that occurs when the user moves the cursor away from a selector resize handle during an active resize operation.
Declaration
public override void OnMouseLeave(DiagramMouseEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
DiagramMouseEventArgs | args | A DiagramMouseEventArgs containing mouse event information. |
Overrides
Remarks
Automatically invoked when the mouse cursor leaves the resize handle area during a resize operation.
If InAction property is true, calls OnMouseUp(DiagramMouseEventArgs) to complete the resize operation.
OnMouseMove(DiagramMouseEventArgs)
Handles mouse move events that occur while the user's mouse moves over selector resize handles during a resize operation.
Declaration
public override bool OnMouseMove(DiagramMouseEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
DiagramMouseEventArgs | args | A DiagramMouseEventArgs containing mouse event information and current position. |
Returns
Type | Description |
---|---|
System.Boolean | A System.Boolean indicating whether the event was handled. Returns true if consumed, false otherwise. |
Overrides
Remarks
Called continuously during resize operations to update visual feedback and calculate new dimensions.
OnMouseUp(DiagramMouseEventArgs)
Handles the mouse up event that occurs when the user releases the mouse button over a selector resize handle, completing the resize operation.
Declaration
public override void OnMouseUp(DiagramMouseEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
DiagramMouseEventArgs | args | A DiagramMouseEventArgs containing mouse up event information. Can be null. |
Overrides
Remarks
Called when resize operation completes. Finalizes the resize, commits new dimensions to selected elements, and updates the diagram layout.