Export image #21

Open
opened 2019-07-16 14:02:57 +00:00 by dangom · 1 comment
dangom commented 2019-07-16 14:02:57 +00:00 (Migrated from github.com)

I could just take a screenshot, but is there a way to export the graph as a png? And perhaps change the background, text, and node colors?
Really cool work by the way. Thanks for sharing!

I could just take a screenshot, but is there a way to export the graph as a png? And perhaps change the background, text, and node colors? Really cool work by the way. Thanks for sharing!
flamingcow66 commented 2019-07-16 15:23:26 +00:00 (Migrated from github.com)

I'd been thinking about this. Strangely, there doesn't seem to be a standard API for this, even though there's a full screen grab API (for video conferencing).

I think the best strategy is probably to generate an SVG using a combination of SVG sprites and the browser's grid positioning. Lines and arrows are already SVG sprites, but I'll have to sort out node borders, text sizing, etc.

I'm changing the title of this to reflect just the export image goal. If you had other concerns around theming or saving, please open other issues.

I'd been thinking about this. Strangely, there doesn't seem to be a standard API for this, even though there's a full screen grab API (for video conferencing). I think the best strategy is probably to generate an SVG using a combination of SVG sprites and the browser's grid positioning. Lines and arrows are already SVG sprites, but I'll have to sort out node borders, text sizing, etc. I'm changing the title of this to reflect just the export image goal. If you had other concerns around theming or saving, please open other issues.
Sign in to join this conversation.