jgraph / drawio-desktop

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

Draw is unable to open an SVG diagram properly #407

Closed raindropsfromsky closed 2 years ago

raindropsfromsky commented 3 years ago

Preflight Checklist

Describe the bug

Draw is unable to open the following SVG diagram. https://www.yworks.com/assets/images/ygucd/am.b0334968.svg

To Reproduce Steps to reproduce the behavior:

  1. Save the SVG diagram on local disk.
  2. Open it in a browser to check if it is ok. Zoom in to check that it does not blur.
  3. Import the same diagram in Draw (using the File>Import menu)
  4. The diagram appears as a blurred thumbnail. image

If we zoom in, the blurriness increases.

Expected behavior An SVG diagram is a vector diagram, and so it should remain crystal clear at any zoom level, and not blur like a raster diagram.

draw.io version (In the Help->About menu of the draw.io editor):

Desktop (please complete the following information):

Additional context I created a flowchart in Draw, and exported it as SVG. Then I imported the SVG file in Draw. It shows the diagram properly. So logically it should display any SVG diagram properly.

mararad commented 3 years ago

Hi,

When I tested your file, it was shown well at my place under zoom. I use

I tried both: drag&drop and File > Import (import Actual size and Resize).

Could you test in other browser and Incognito mode and check all options I mentioned above? And also update it to 13.8.0

Regards,

raindropsfromsky commented 3 years ago

Hi

My bug is for the Desktop version of Draw (not the online version).

Regards

mararad commented 3 years ago

My suggestion would be to drag&drop SVG into the editor and check if it is blurred. File > Import results with blur image.

Regards,

raindropsfromsky commented 3 years ago

With drag-n-drop, the image is not blurred. The import yields a blurred image, as reported.

However, I cannot edit the image when I drag-n-drop. I can only zoom in/out.

In contrast, if I compose an image in draw.io and export it as svg, I can import it and edit the elements.

stale[bot] commented 3 years 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.

hohwille commented 3 years ago

FYI: This is still all very strange:

What I really need is to edit the SVG with drawio so I can ungroup shapes, edit texts, etc. However this is not supported and I have to redraw the entire SVG from scratch with drawio. Also copy&pasting shapes from Inkscape, BoxySvg, Visio, Dia, or any other vector drawing program into drawio is not possible. That is sad...

mattwilmott commented 2 years ago

If drawio were able to open/import an SVG exported from Inkscape, Visio or even PowerPoint, the tool would be an order of magnitude more useful. I am often presented with flow/governance/network/systems diagrams as SVG images exported from these toolsets and would love to work with them rather than redrawing.

I can see others have similar requirements, https://arlanblogs.alvarnet.com/converting-azure-architecture-powerpoint-slides-to-diagrams-net-draw-io-platform/

davidjgraph commented 2 years ago

To be clear, draw.io is not an SVG editing tool. If that's the intention of this request, afraid that's out of scope of this project. But, the thread is about SVGs being imported as a bitmap.

In terms of that original problem, we need an example SVG and the environment details that recreate the problem.

EricPotratz commented 2 years ago

I'm having the same problem.

All drawing programs should be able to import/export/edit SVG files since they are just XML files. I've tried uploading my SVG file to draw.io (Diagrams.net) and it only uploads a static image. Is there anyway to upload an SVG so it can be edited like any other XML file?

I had to change the extension to .jpg to upload the file. It will need to be changed back to .svg: Palm Fruit research timeline diagram

davidjgraph commented 2 years ago

No. Again, draw.io is not an SVG editor. "All drawing programs should be able to import/export/edit SVG files since they are just XML files." is technically nonsense.

I am locking this thread.