jgraph / drawio-desktop

Official electron build of draw.io
https://www.diagrams.net
Apache License 2.0
50.66k stars 5.02k forks source link

Missing icon when "Save as -> Editable Vector Image .svg" #1236

Closed saulogt closed 3 days ago

saulogt commented 1 year ago

Preflight Checklist

You must agree to search and the code of conduct. You must fill in this entire template. If you delete part/all or miss parts out your issue will be closed.

Describe the bug

Some icons do not appear in the svg file (Editable Vector Image) The file generated contains a path to the icon file inside the app itself, which obviously will not work out of my computer.

...
<image x="-0.5" y="-0.5" width="50" height="41" 
xlink:href="file:///Applications/draw.io.app/Contents/Resources/app.asar/drawio/src/main/webapp/img/lib/mscae/Docker.svg"/>
...

To Reproduce Steps to reproduce the behavior:

  1. Search for "Docker" shape and add to the document
  2. Save as "Editable Vector Image .svg" - *.drawio.svg
  3. Open the svg file
  4. See error

Expected behavior All icons should be displayable

Screenshots

arquitecture2 drawio svg - diagrams net 2023-02-14 12-03-01

documentation at svg 2023-02-14 12-06-29

draw.io version:

Desktop:

Additional context NA

saulogt commented 1 year ago

I found a similar issue in other repo, but the cause is different https://github.com/jgraph/drawio/issues/2763

stale[bot] commented 8 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. See the FAQ for more information.

jan-hudec commented 8 months ago

I found a similar issue in other repo, but the cause is different jgraph/drawio#2763

The workaround mentioned there is, however, just as applicable here—make the icons embedded.

I don't consider it a fix, because it requires going over all icons in the diagram, plus you don't really need to embed the images in the drawio document, only in the exported SVG.

github-actions[bot] commented 2 weeks ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. See the FAQ for more information.