Closed harryhoch closed 8 years ago
Either PNG image or SVG (better option) snapshot. Will prob lose those animations/popups/tooltips. Maybe also hide some elements for the printable version, like the options button.
@harryhoch After checking out the discussions from https://github.com/monarch-initiative/monarch-app/issues/488, I feel my earlier understanding from last Friday was very different. I thought it was supposed to be a downloadable graphic (PNG or SVG) that serves as a snapshot of the current visible phenogrid. Then it can be used in research papers or presentations.
Please advise.
yes, that's right. start with the SVG /PNG. we can then add tabular data if requested.
Have added the downloadable SVG.
Below is how save SVG looks in browser. I removed the logo since it links to external image, also removed the controls and popup icon near the model score since you won't be able to click those.
looks good. How hard would it to be to embed this in a pdf with some summary text?
Did you mean by embedding the SVG as an image in PDF and then add some text about the image in PDF? Right now it generates a SVG file than you can view or edit. Converting the SVG into PNG using javascript on client side didn't work very well after some testing. So the users still need to capture the image from the SVG version, which is very easy by just a screenshot or exporting using graphic tools, they can also save the SVG as PDF directly to get a scalable rendering. I don't quite understand if Adobe allows inserting SVG directly in PDF.
@yuanzhou, I was thinking about an extended PDF report that would be a printable summary of the contents. We could wrap the phenogrid with a textual table and some other info.
There are tools that might help - see, for example, http://pdfkit.org/
Something worth thinking of, but not short term. For the time being, can you add a button for the PDF export of the grid?
@harryhoch I've added the button says "Save Phenogrid as SVG", did you mean to change this to "Export Phenogrid as PDF"? My approach to saved SVG was go find the SVG tag in the DOM and clone it then clean it up, then wrap the SVG content into a SVG file. I used Filesaver.js and blob for the save as popup dialog. And I think it's simple and straightforward. If you can do a simple browser print to save the SVG as PDF, why do we need to export it directly to PDF and lose the SVG editing capability?
ok. you've convinced me. let's leave it as it is for now.
Merged changes via PR #174
We can open new issues for additional new features regarding this report.
some way to export both phenotype/genotype matrix and details to a format suitable for publication/redistribution. https://github.com/monarch-initiative/monarch-app/issues/488