rostam / GTea

Online version of GraphTea
http://www.graphtheorysoftware.com/
4 stars 4 forks source link

Add functionality for creating custom graphs #1

Open HKH515 opened 7 years ago

HKH515 commented 7 years ago

Allow the user to create/delete vertices/edges

rostam commented 7 years ago

This functionality is there. I have some suggestions. Whenever that user adds a vertex or edge, the whole graph is built again: cy.batch(function(){ cy.elements().remove(); cy.add(nodes); cy.add(edges); applyLayout(); }); setTimeout(reload, 1000);

Why do you that. Why not just adding that specific new element? cy.add(...)

Is there any problem with that?

HKH515 commented 7 years ago

We were having some problems where some nodes that we added in cyto didnt exist in the backend, so we just resorted to get all info about the graph each time we edit the graph clientside, it's not very efficient but this was a solution that fixed that bug. To be honest we are not very proficient with cytoscape, we don't really know how to to this efficiently in cytoscape.