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

Layer panel does not work as expected for layer created for orphan elements #997

Open
VenissaCarolQuadros opened this issue Oct 2, 2024 · 0 comments
Labels

Comments

@VenissaCarolQuadros
Copy link
Contributor

**PLEASE NOTE: We are trying to make this project live again. While you can file an issue, we will do our best but you should not expect any action, even if we label the issue. However, we are welcoming new contributors **

Describe the bug
When a new file is imported, if elements are not part of a layer they are automatically assigned to a layer. However, the 'eye' icon in the layer panel is not visible indicating that the layer is invisible but it is not. Also, toggling this does not modify the visibility.

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://svgedit.netlify.app/editor/index.html
  2. Import the following SVG file :
<svg width="254.00000000000003" height="105.83333" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg" version="1.1" xml:space="preserve">
<rect fill="#FF0000" height="11" id="svg_1" stroke="#000000" stroke-width="5" width="37" x="108.5" y="63.82"/>
</svg>
  1. Try toggling visibility in the LayerPanel

Expected behavior
Completely functional LayerPanel for new layer created for orphan elements

SVG-Edit environment (IMPORTANT)

  • File for SVG-Edit: [e.g., svg-editor.html, svg-editor-es.html, embedapi.html] ??
  • Version: v7
  • Protocol: https

Desktop :

  • OS: Windows
  • Browser Chrome
  • Version 29.0.6668.72

Screenshots
image
image

Potential resolution
I believe the issue is caused by 'name' not being defined. This results in it not being added to layer_map. Initializing name as 'getNewLayerName(layernames)' should resolve this.

Please let me know if I've been amiss in tracing the root cause.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants