svgedit icon indicating copy to clipboard operation
svgedit copied to clipboard

Path and line tool stuck disabled if selecting shape

Open sjernigan opened this issue 5 years ago • 7 comments

Describe the bug Selecting a shape with stroke color of none (no opacity or color in SVG) leaves the line and path tool disabled. It's not obvious to the user how to reenable them. However, selecting a similarly looking shape with a stroke color and opacity of 0 leaves the tools enabled. The tools already know to change the width to 1 if it's currently zero.

To Reproduce

  1. Use the "polygon" extension to draw pentagon. It should have a 5pt stroke.
  2. Set the stroke color to none. The stroke should have an opacity of 0 now.
  3. Click (not click and drag) anywhere. This will not result in a viewable shape. However, the line and path tools are now disabled.
  4. Click and drag a new pentagon (or any other shape) of the same size as the first one.
  5. The only way to get the line and path tools back is to select the first shape or manually change the stroke color to something.

Expected behavior When the width is zero or the opacity is set in the svg, the tools are enabled. In fact, they default the width back to 1 when selected. This is not the case here leaving the user wondering confused. The shapes look identical but behave differently.

SVG-Edit environment (IMPORTANT) db06248 on Dec 26, 2018

Desktop (please complete the following information):

  • OS: iOS
  • Browser chrome
  • Version latest

sjernigan avatar Feb 15 '19 22:02 sjernigan

Trying to replicate... Exactly how are you setting the stroke color to none?

brettz9 avatar Feb 21 '19 11:02 brettz9

Thanks for responding. By selecting the red X in the color picker.

sjernigan avatar Feb 21 '19 15:02 sjernigan

By manually changing the stroke color in step 5, do you mean through the source view? Which attribute?

brettz9 avatar Feb 21 '19 15:02 brettz9

No use of the source viewer needed. I meant going to the stroke color picker again and selecting a color.

sjernigan avatar Feb 21 '19 16:02 sjernigan

Manually changing the stroke color (in Chrome or Firefox) in step 5 doesn't help remedy the situation, but clicking on the original shape kind of does.

And I can replicate with as little as your step 1 and 3 alone.

brettz9 avatar Feb 25 '19 09:02 brettz9

This is also affecting other tools like the star tool and I believe it happened for me with the circle tool once.

brettz9 avatar Feb 25 '19 09:02 brettz9

And as far back as 2.8 at least: https://svg-edit.github.io/svgedit/releases/svg-edit-2.8/svg-editor.html ...

brettz9 avatar Feb 25 '19 09:02 brettz9