Closed darioillusorium closed 3 months ago
It seems that the function is correct. Maybe the values no out_id and in_id are not correct.
Try forcing node connections to refresh:
editor.updateConnectionNodes('node-5');
Remember that the use of the function is like this and the nodes must be created.
editor.addConnection(1, 2, 'output_1', 'input_1');
Thanks for the quick response, it seems that everything is correct and I also tried to force it. But I don't get it. I'll keep researching to see if I find anything I might be doing wrong. If I find the reason I'll show you. Thank you so much.
To give more context, if the ids do not exist the event does not occur. So due to in my case the event occurs, the IDs are correct. If the input_class or output_class does not exist, an exception is raised. Therefore I am also introducing correct classes.
I keep researching
Sorry for the confusion, there was a procedure that was deleting my connections.
Thanks
Hi! I'm not sure if it is a known issue or i'm doing something wrong.
When I use de addConnection method, connection event "connectionCreated" occurs, I can catch the event and the connection data is correct but the drawflow node connection data is not updated. The connection is not added to the graph. However, if I connect it via interface (drag and drop output to input), all is correct: connectionCreated event occurs and node connection data is updated.
I use
editor.value.addConnection(out_id, in_id, 'output_1', 'input_1')
and seems to be correct, event occurs. But node connection data is not updated.Thanks!
Darío :)