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

There should be only one transform per layer #42

Closed
jni opened this issue Jun 19, 2024 · 0 comments · Fixed by #45
Closed

There should be only one transform per layer #42

jni opened this issue Jun 19, 2024 · 0 comments · Fixed by #45

Comments

@jni
Copy link
Member

jni commented Jun 19, 2024

In his review of #40, @andy-sweet noted that every point in a points layer gets its own transform. This is wasteful since there is only one transform in a layer. Instead, all elements of one layer should be grouped in a <g> tag that contains the relevant transform. In the current implementation layer elements weren't grouped (they were all added to a single long list), but I think that was a flaw in the existing implementation, since svg editing software would allow operating on groups, and it might be desirable e.g. when making a figure to edit a whole layer together.

jni added a commit to jni/napari-svg that referenced this issue Jun 19, 2024
jni added a commit that referenced this issue Jun 20, 2024
Closes #42

- Elements from a single layer are grouped in `<g>`
- Change layer-to-xml functions to return elements rather than lists
@jni jni closed this as completed in #45 Jun 20, 2024
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 a pull request may close this issue.

1 participant