kinimesi / cytoscape-svg

A Cytoscape.js extension to export the current graph view as an SVG.
https://kinimesi.github.io/cytoscape-svg
GNU General Public License v3.0
34 stars 5 forks source link

Add element's id in SVG #5

Closed Jmedjid closed 2 years ago

Jmedjid commented 4 years ago

Hi !

After exporting the graph to svg, we observe that there is no id for the different elements which makes their selection difficult. Would it be possible to include specific identifiers for each of them ?

kinimesi commented 4 years ago

@Jmedjid this is not possible with the current implementation. We use canvas2svg to convert the Cytoscape canvas into SVG. It might be possible to modify the methods in the canvas2svg library to take the ID as a parameters, but it'd require significant amount of work. Feel free to look into it, and make a PR if you figure it out.

Thanks!