waltz icon indicating copy to clipboard operation
waltz copied to clipboard

Flow Diagram: thumbnail support (UI)

Open davidwatkins73 opened this issue 5 years ago • 6 comments

Related to #3923

davidwatkins73 avatar May 13 '19 10:05 davidwatkins73

Have attempted this using https://github.com/exupero/saveSvgAsPng

line and annotations don't appear to render correctly, see below:

diagram

Needs further investigation

kamransaleem avatar Jun 12 '20 14:06 kamransaleem

Similar results with the code snippet from here: http://bl.ocks.org/biovisualize/8187844

kamransaleem avatar Jun 12 '20 14:06 kamransaleem

Could you make a draft PR with the progress so far ?

davidwatkins73 avatar Jun 15 '20 10:06 davidwatkins73

It's probably external styles. I think if we move to a <style> section within the svg or inline all the styles it may work....

davidwatkins73 avatar Jun 15 '20 10:06 davidwatkins73

Hi Kam,

Added some code (see patch at bottom) to clone the svg first and inline styles to the copy. Gives a better result as shown below (top: orig, bottom: clone). Can't get the font-awesome stuff to work. However we may be able to simply remove anything with a class of fa as this is only for thumbnails and so the icons won't matter too much.

image

dw_4051.patch.txt

davidwatkins73 avatar Jun 15 '20 20:06 davidwatkins73

Thanks Dave, agreed re: icons, the thumbnails will be so small it won't matter.

kamransaleem avatar Jun 16 '20 14:06 kamransaleem