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

Custom properties #26

Merged
merged 4 commits into from
May 21, 2024
Merged

Custom properties #26

merged 4 commits into from
May 21, 2024

Conversation

ekinimo
Copy link
Contributor

@ekinimo ekinimo commented May 18, 2024

Hello!
I added <g> tag around vertices and edges in svg backend. Here is the documentation for the tag . As far as i understood this should not interfere with the rendering of the child elements.
Elements and Arrows have now additional constructors with properties:Optional<String> argument to dictate the properties of the <g> tag.

@nadavrot
Copy link
Owner

Thanks @ekinimo. This looks pretty good. I have a few comments. First, run 'cargo fmt', to make sure that the formatting is okay. Second, with_properties could be implemented using 'new', or the other way around, to eliminate duplication. Same with simple_with_properties.

Everything else looks good. Just make these tiny fixes and I'll land the change.

@ekinimo
Copy link
Contributor Author

ekinimo commented May 20, 2024

Hey @nadavrot
I made the changes, i hope you like them.

I have a preliminary version of ForeignElement feature that suffices my needs. You can check the branch here
Im working on a version that hides behing Text and ForeignObjects behind a trait so that it would be more general but that ll take a bit more time and it is not as trivial as i hoped it would be, i had to add lot of genericsto a lot of structs. Ill present that branch after im happy with it as well

@nadavrot nadavrot merged commit 573248c into nadavrot:master May 21, 2024
4 checks passed
@nadavrot
Copy link
Owner

Thanks for doing the work!

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

Successfully merging this pull request may close these issues.

2 participants