allow node selection in read only mode

Hi, 
For making the diagram I used  
this.constraints = DiagramConstraints.None;


but with this I also want node only to get select, how can I achieve these both together?
    this.constraints = NodeConstraints.Select;

Please help!
Thanks in advance

1 Reply 1 reply marked as answer

AR Aravind Ravi Syncfusion Team June 19, 2020 05:06 AM UTC

Hi Rakhi, 

By default, in the diagram if we set diagram constraints as None means we cannot able to do any interactions in the diagram like select, drag, scale the node or connector. To enable selection for the node and disable multiple selection for diagram set diagram tools as SingleSelect. So that in diagram we can able to do select the node. Please refer the code example and sample below 

public tool: DiagramTools = DiagramTools.SingleSelect; 

<ejs-diagram #diagram id="diagram" width="100%" height="645px" [getConnectorDefaults]='connDefaults' [getNodeDefaults]='nodeDefaults' [snapSettings]='snapSettings' [tool]="tool"


For more information about diagram tools please refer to below UG documentation link 


Regards 
Aravind Ravi 


Marked as answer
Loader.
Up arrow icon