I'd like to trigger an event (change the data of source and target nodes) when edge creation is complete using js.cytoscape edgehandles. I need this to happen only when the edge has definitely been created (see Note below).
How can I achieve this? May I customize the complete function at the beginning of the js.cytoscape-edgehandles file?
complete: function( sourceNode, targetNodes, addedEntities ){
// fired when edgehandles is done and entities are added },
So far I have customized the makeEdges function. But the result is that events may be triggered before the edge creation process is completed.
function makeEdges( preview, src, tgt ){}
Would you recommend to rewrite the code and customize the edgeParams() and complete() functions?
Thanks,
Umbolt
(Note) In my code, the width of created edges is a function of the source node data, which is altered once an edge has been created. If data alteration happens before completion, source and target node data may be altered although the edge has not been created, which affects subsequent edge creation.