documentationfor yFiles for HTML 2.6

GridVisualCreator

Renders a grid, using various different styles and render technologies.

Inheritance Hierarchy
GridVisualCreator
Implemented Interfaces

Remarks

The SVG renderMode provides the following CSS classes to conveniently change the color of the grid visual:

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 Details

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

See Also

Constructors

Properties

Methods