Hi,
I am using diagram where i give the option to the user to choose
1. SnapToLines
2. SnapToObjects
3. SHow/Hide Lines.
I use checkbox to get the input. If checked it's true
Show/hide lines is working fine.
But when i use other 2 Settings with ShowLines it is not working.
My relevant code is as follows
// in .ts
public gridLines:string = 'ShowLines';
public gridLinesColor:string = '#dddddd';
public snapSettings: SnapSettingsModel = {
constraints:SnapConstraints.SnapToLines | SnapConstraints[this.gridLines],
horizontalGridlines: {
lineColor: this.gridLinesColor
},
verticalGridlines: {
lineColor: this.gridLinesColor
}
};
// in .html file
<ejs-diagram id="diagram" #diagram
[getNodeDefaults]="nodeDefaults"
[getConnectorDefaults] ='connectorDefaults'
width="1080px" height="1080px"
(collectionChange)="collectionChange($event)"
[snapSettings]='snapSettings'
[pageSettings]="pageSettings">
ejs-diagram>
If SnapConstraints[this.gridLines] alone is used, then it works.
Attachment:
UI_482ff40f.zip