cytoscape.js-graphml icon indicating copy to clipboard operation
cytoscape.js-graphml copied to clipboard

Cytoscape style is not being preserved

Open canbax opened this issue 4 years ago • 1 comments

1-) I have an cytoscape.js graph. Ideally it looks like below image

2-) If I empty styles of cytoscape by executing js code cy.style([]), graph looks like below image

3-) If I set cytoscape style with a command like cy.style([/* some big array object */ ]) it becomes as the ideal like the first image.

4-) When I execute cy.graphml() on first image to generate xml. Then load using command cy.grapml('xml string previously generated') on a empty canvas I get image

5-) As could be seen from above image, graphml does not preserve style information (I tried with css: true also). When I apply the old styles like in step 3, I expect to see a graph like first image but it does not. The above image doesn't change a bit

6-) When I give the same object as a string like cy.style('[/* some big array object */ ]') it gives me a bit more stylish graph (below image) image

canbax avatar Sep 04 '19 13:09 canbax