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

Bug when trying to show SVG content #408

Closed
jfhenon opened this issue Apr 19, 2020 · 1 comment
Closed

Bug when trying to show SVG content #408

jfhenon opened this issue Apr 19, 2020 · 1 comment

Comments

@jfhenon
Copy link
Collaborator

jfhenon commented Apr 19, 2020

Describe the bug
Bug when trying to show SVG content when the context is changed.

To Reproduce
Steps to reproduce the behavior:

  1. Load the following sampe SVG:
<svg width="640" height="480" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg">
 <!-- Created with SVG-edit - https://github.com/SVG-Edit/svgedit-->
 <g class="layer">
  <title>Layer 1</title>
  <g id="svg_6">
   <rect fill="#FF0000" height="71" id="svg_1" stroke="#000000" stroke-width="5" width="94" x="69.5" y="51.5"/>
   <circle cx="117.5" cy="87.5" fill="#ffff00" id="svg_5" r="19.84943" stroke="#000000" stroke-dasharray="null" stroke-linecap="null" stroke-linejoin="null" stroke-width="5"/>
  </g>
 </g>
</svg>
  1. move the context to the group by double-click on the rectangle
    image
  2. click on the following button image
  3. the action will fail and an error is displayed in the console:
    image
    Expected behavior
    A window with the SVG content should be displayed.

SVG-Edit environment (IMPORTANT)
https://unpkg.com/svgedit@5.1.0/editor/svg-editor.html

Desktop (please complete the following information):

  • OS: MacOS
  • Browser Chrome
  • Version 81.0.4044.113

Screenshots
see above

Log
see above

Additional context
Add any other context about the problem here.

if (showGrips || selectedElements.length === 1) {

This seems to related to the conditional statement above. If showGrip is false or undefined AND selectedElements.length == 0, it fails on the statement selectorManager.requestSelector.

should it be the following?

if (selectedElements.length === 1) {
  selectorManager.requestSelector(selectedElements[0]).showGrips(showGrips)
}
jfhenon pushed a commit to OptimistikSAS/svgedit that referenced this issue Jun 19, 2020
jfhenon pushed a commit to OptimistikSAS/svgedit that referenced this issue Jun 20, 2020
jfhenon added a commit that referenced this issue Jun 25, 2020
@brettz9
Copy link
Contributor

brettz9 commented Jun 26, 2020

Hi @jfhenon .... Is there anything left outstanding on this?

@jfhenon jfhenon closed this as completed Jun 26, 2020
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