Interface for a class SnapSettings
Constraints for gridlines and snapping
Defines the diagram Grid pattern.
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');
number
Defines the angle by which the object needs to be snapped
string
Defines the color of snapping lines
number
Sets the minimum distance between the selected object and the nearest object
Defines the vertical gridlines