iVis-at-Bilkent / sbgnviz.js

A web based visualization tool for process description maps in SBGN
http://www.cs.bilkent.edu.tr/~ivis/SBGNViz_sample_app/
GNU Lesser General Public License v3.0
35 stars 14 forks source link

Add optional parameters to saveAsPng, saveAsJpg, saveAsSvg #212

Closed vincent-noel closed 3 years ago

vincent-noel commented 4 years ago

Adds parameters which are available in cytoscape but not sbgnviz. They should be completely optional and shouldn't change existing behaviour.

Note that saving as SVG with background-color do not work (Hasan confirmed it).

vincent-noel commented 3 years ago

Hi @hasanbalci ,

Thank you for finding this ! I was clearly lacking tests, and missed this case. Your solution is perfect, I used it for png and jpeg (svg don't have this maxWidth/maxHeight option, right ?)

hasanbalci commented 3 years ago

@vincent-noel Actually, svg should also support maxWidth and maxHeight.

vincent-noel commented 3 years ago

Hi @hasanbalci ,

Indeed it's working, I was confused. If everything is ok now, I can squash the four commits into one before you merge.