Hi Peter,
When we move the connector to the node for establishing connection, it will dock to the node center. If you need to connect to a port, then you should move connector exactly to the port. It is a default behavior of the diagram control. We don’t have option to establish the connection with nearest ports in nodes, while drawing the connector at runtime.
Also, when you need only port to port connection and to disable node to node connection, please remove InConnect and OutConnect constraints from default NodeConstraints. Please refer to a code example and modified sample.
Code example:
const loadDiagram = () => {
console.log("save is", save)
// iterate the nodes
for(let i=0; i< save.nodes.length; i++) {
let node = save.nodes[i];
// remove the connect constraints
node.constraints = NodeConstraints.Default &~(NodeConstraints.InConnect | NodeConstraints.OutConnect);
}
save = JSON.stringify(save)
diagramInstance.loadDiagram(save)
} |
Please let us know whether an above solution satisfies your requirement?
Regards,
Shyam G