This is a flagging interface for instances of IGridConstraintProvider<T> that can snap coordinates of IBends to a grid.
Inheritance Hierarchy
IBendGridConstraintProvider
Implemented Interfaces
Remarks
An implementation of this interface can be queried using the lookup of a IInputModeContext.
Type Details
- yFiles module
- view
Properties
Gets the canonical origin of the grid.
Defined in
Gets the canonical grid width in horizontal direction.
Defined in
Gets the canonical grid width in vertical direction.
Defined in
Methods
snapToGrid
(context: IInputModeContext, item: IBend, location: IMutablePoint, xSnapPolicy: SnapPolicy, ySnapPolicy: SnapPolicy) : booleanPerforms the actual snapping to grid coordinates.
Parameters
options - Object
A map of options to pass to the method.
A map of options to pass to the method.
- context - IInputModeContext
- The context in which the snapping should occur.
- item - IBend
- The item of which the coordinates should be snapped.
- location - IMutablePoint
- The coordinates to snap.
- xSnapPolicy - SnapPolicy
- The policy for the x-coordinate.
- ySnapPolicy - SnapPolicy
- The policy for the y-coordinate.
Returns
- ↪boolean
- Whether the point has been snapped.
Defined in
Static Methods
Parameters
options - Object
A map of options to pass to the method.
A map of options to pass to the method.
- snapToGrid - function(IInputModeContext, IBend, IMutablePoint, SnapPolicy, SnapPolicy):boolean
Performs the actual snapping to grid coordinates.
This property holds the implementation for snapToGrid.
- horizontalGridWidth - number
Gets the canonical grid width in horizontal direction.
This property holds the implementation for horizontalGridWidth.
- verticalGridWidth - number
Gets the canonical grid width in vertical direction.
This property holds the implementation for verticalGridWidth.
- gridOrigin - Point
Gets the canonical origin of the grid.
This property holds the implementation for gridOrigin.