documentationfor yFiles for HTML 2.6

GridConstraintProvider<T>

A simple integer based implementation of IGridConstraintProvider<T>.

Inheritance Hierarchy
GridConstraintProvider
Implemented Interfaces

Examples

Enabling grid snapping

const snapContext = new GraphSnapContext()

const gridInfo = new GridInfo(50)
snapContext.nodeGridConstraintProvider = new GridConstraintProvider(gridInfo)
snapContext.bendGridConstraintProvider = new GridConstraintProvider(gridInfo)
snapContext.portGridConstraintProvider = new GridConstraintProvider(gridInfo)
snapContext.gridSnapType = GridSnapTypes.GRID_POINTS

graphEditorInputMode.snapContext = snapContext

Note that the grid visualization has to be enabled separately

graphComponent.backgroundGroup.addChild(new GridVisualCreator(gridInfo))

Type Parameters

T
The type of the items.

Type Details

yfiles module
view-component
yfiles-umd modules
All view modules
Legacy UMD name
yfiles.input.GridConstraintProvider

Constructors

Properties

Methods