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

Allow xml references #86

Open
ggreif opened this issue Dec 3, 2015 · 2 comments
Open

Allow xml references #86

ggreif opened this issue Dec 3, 2015 · 2 comments

Comments

@ggreif
Copy link
Contributor

ggreif commented Dec 3, 2015

When I have a green circle and want to duplicate it to many translated positions, then the circle's svg source will get textually duplicated. When the duplicand has a lot of source this can get very verbose. Any chance to use xml references optionally to refer to the original?

@byorgey
Copy link
Member

byorgey commented Dec 17, 2015

This is definitely something we want to support. It shouldn't be too hard to get a simple version working: add a new type of Annotation (in diagrams-core) specifying some sort of id, then modify the SVG backend to notice these and only generate one copy, with references. However, doing it that way requires the user to come up with unique names (giving the same name to different subdiagrams would result in wrong output). I've thought a bit about how to do recovery of sharing automatically, using a system of hashes, but that would be more work.

@ggreif
Copy link
Contributor Author

ggreif commented Aug 19, 2016

Here is a way how to do it: http://vanseodesign.com/web-design/svg-definition-reuse/

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

2 participants