Defines the gridlines and defines how and when the objects have to be snapped
Constraints for gridlines and snapping
Defaults to ‘All’
string
Defines the diagram Grid pattern.
Defaults to ‘Lines’
Defines the horizontal gridlines
<div id='diagram'></div>
let horizontalGridlines: GridlinesModel = {lineColor: 'black', lineDashArray: '1,1' };
let verticalGridlines: GridlinesModel = {lineColor: 'black', lineDashArray: '1,1'};
let diagram: Diagram = new Diagram({
...
snapSettings: { horizontalGridlines, verticalGridlines, constraints: SnapConstraints.ShowLines,
snapObjectDistance: 5, snapAngle: 5 },
...
});
diagram.appendTo('#diagram');
Defaults to {}
number
Defines the angle by which the object needs to be snapped
Defaults to 5
string
Defines the color of snapping lines
Defaults to ‘#07EDE1’
number
Sets the minimum distance between the selected object and the nearest object
Defaults to 5
Defines the vertical gridlines
Defaults to {}