question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Edges are not visible outside `.react-flow__viewport` when we export the canvas to png

See original GitHub issue

Describe the Bug

Edges are getting cut off outside .react-flow__viewport when we export the whole react flow canvas as png. I’m facing issue while using html-to-image, but this issue is reproducible with all the methods used to convert a canvas to png file. There is a related issue #2016 which fixed the issue in the canvas, but this occurs in the exported png.

Your Example Website or App

No response

Steps to Reproduce the Bug or Issue

  1. Create any complex graph with many nodes and edges
  2. Convert the react flow canvas to png with any external package

Expected behavior

Edges should not cut off outside .react-flow__viewport, since nodes are visible outside. This was working perfectly fine in v9.

Screenshots or Videos

Platform

  • OS: [macOS]
  • Browser: [Chrome]
  • Version: [100.0]

Additional context

No response

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
sriramanb2021commented, May 22, 2022

@junrezapico Yeah. I replaced html-to-image with save-html-as-image, and it worked flawlessly!

1reaction
moklickcommented, Sep 20, 2022

I’ve created a “Download Image” example that uses html-to-image.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Export as to export png moves the image on the canvas
The image on my canvas sits slightly right of center and becomes centered when I move into export as. There are no options...
Read more >
how to save canvas as png image? - javascript - Stack Overflow
This shows image from canvas on new page, but if you have open popup in new tab ... This is working and download...
Read more >
how do I export the whole of my endless canvas to a png
Hello I am trying to export the whole diagram, but it's not exporting the whole thing. How do I do it? Thanks.
Read more >
Solved: Save a poster containing text hyperlinks as png or...
Solved: Hello All, I intend to save my designed poster containing text hyperlinks as a png or jpg file (and not save as...
Read more >
HTMLCanvasElement.toDataURL() - Web APIs | MDN
If the file format is not specified, or if the given format is not supported, then the data will be exported as image/png...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found