We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Diagram NodeConstraints/ConnectorConstraints Select not allowing click

Hi, I am changing my constraints for nodes and connectors to "Select" only, but I can only select the nodes/connectors by dragging over them.

I would like to be able to select them by clicking as well, while keeping the other constraints disabled. Could you tell me how to do this?

This is how I am changing the constraints:

var diagramObj = JSON.parse(CallbackPanel.cpDiagramString) // the diagram schema

if (editingRights == false){
    // Prevent editing if no write access
    if (diagramObj.nodes) {
        var NodeConstraints = ej.datavisualization.Diagram.NodeConstraints;
        diagramObj.nodes.forEach(function (node) {
            node.constraints = NodeConstraints.Select;
        });
    }
    if (diagramObj.connectors) {
        var ConnectorConstraints = ej.datavisualization.Diagram.ConnectorConstraints;
        diagramObj.connectors.forEach(function (connector) {
            connector.constraints = ConnectorConstraints.Select;
        });
    }
}
$("#diagram").ejDiagram(diagramObj);

1 Reply

RT Ramya Thirugnanam Syncfusion Team December 4, 2018 06:20 AM UTC

Hi David, 
 
Thanks for contacting Syncfusion support. 
 
Please use the constraints of node as below to allow selection alone to the node. 
 
 
Node.constraints = NodeConstraints.PointerEvents | NodeConstraints.Select 
 
 
 
Regards, 
Ramya T 


Loader.
Up arrow icon