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); |