Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Groups not being populated by children correctly in SVG export #4829

Open
2 tasks done
mandrewpowers opened this issue Jan 4, 2025 · 0 comments
Open
2 tasks done

Comments

@mandrewpowers
Copy link

mandrewpowers commented Jan 4, 2025

Preflight Checklist

  • I agree to follow the Code of Conduct that this project adheres to.
  • I have searched the issue tracker for a feature request that matches the one I want to file, without success.

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.

If you are technical, you should report bugs along the lines of https://marker.io/blog/how-to-write-bug-report. If you are not technical, we will make allowances, please try to make an effort to understand the process.

Describe the bug
Found an old issue (#3960) about groups not being preserved in SVG export and noticed it should be happening since v24.6.0, but it seems there is an issue now where groups are being added to the exported document although they are not populated properly.

To Reproduce
Steps to reproduce the behavior:

  1. Go to draw.io
  2. Open a blank diagram
  3. Group a bunch of random shapes
  4. Export as SVG (all options disabled)

Expected behavior
All grouped shapes are encapsulated by a <g> element representing the grouping.

Screenshots
Exported SVG:

No plugins:
No plugins

You can see the group element was exported, but none of the child objects are within the group.

If I export using the svgdata plugin and add custom cell identifiers I see the same result. This also does show that the plugin does not seem to add the metadata to the original content but instead wraps it more.

Recreated with svgdata:
Recreated with svgdata

I noticed this issue when working on a large floorplan and exported the SVG to display elsewhere with interaction. Since the groups didn't actually wrap the elements none of the interactions worked so I dug into this a bit.

Multiple groups not wrapping any content:
Multiple groups not wrapping any content

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

  • draw.io version: Web v26.0.3

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser: Firefox
  • Browser Version: 133.0.3

Smartphone (please complete the following information):

  • Device: N/A
  • OS: N/A
  • Browser: N/A
  • Browser Version: N/A

I tested the problem in incognito/private mode with all browser extensions switched off, write "yes" below:

  • yes

Additional context
Add any other context about the problem here.

@mandrewpowers mandrewpowers changed the title Groups not being propulated by children correctly in SVG export Groups not being populated by children correctly in SVG export Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant