This is a flagging interface for instances of IGridConstraintProvider<T> that can snap coordinates of IBends to a grid.
Remarks
Type Details
- yfiles module
- view-component
- yfiles-umd modules
- All view modules
- Legacy UMD name
- yfiles.input.IBendGridConstraintProvider
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
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
Creates an implementation of the interface IBendGridConstraintProvider from the given definition.
Remarks
Parameters
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.
Returns
- ↪IBendGridConstraintProvider
- An instance of the IBendGridConstraintProvider interface based on the given definition.