How to disable connector selection in Angular Diagram?
This article explains how to disable connector selection in Angular Diagram. In Angular Diagram, connectors are used to create links between nodes or ports to represent the relationships between them. A connector can be created by defining the source and target points of the connector. To disable connector selection, you can remove the selection constraints from the default connector constraints. This prevents users from selecting the connector when interacting with the diagram.
app.component.html
<ejs-diagram
#diagram
id="diagram"
width="100%"
height="780px"
[connectors]="connectors"
>
</ejs-diagram>
app.component.ts
public connectors: ConnectorModel[] = [
{
id: 'connector1',
sourceID: 'node1',
sourcePortID: 'port2',
targetPortID: 'port4',
targetID: 'node3',
type: 'Orthogonal',
constraints: ConnectorConstraints.Default & ~ConnectorConstraints.Select,
annotations: [{ constraints: AnnotationConstraints.ReadOnly }],
},
];
Refer to the working sample for additional details and implementation:Sample
Conclusion
We hope you enjoyed learning about how to disable connector selection in Angular Diagram.
You can refer to our Angular Diagram feature tour page to learn about its other groundbreaking feature representations and documentation, as well as how to quickly get started with configuration specifications. You can also explore our Angular Diagram example to understand how to create and manipulate data.
For current customers, you can check out our components from the License and Downloads page. If you are new to Syncfusion®, you can try our 30-day free trial to check out our other controls. If you have any queries or require clarifications, please let us know in the comments section below. You can also contact us through our support forums, BoldDesk Support, or feedback portal. We are always happy to assist you!