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

Abnormal stroke after exporting SVG and cleaning: the eraser trace cannot be removed #142

Open
LBruyne opened this issue Oct 2, 2023 · 0 comments

Comments

@LBruyne
Copy link

LBruyne commented Oct 2, 2023

Describe the bug
After exporting as SVG, the drawing function behaves abnormally: the brush cannot cover areas that were previously (before exporting to SVG) erased with the eraser. At this point, you need to tap the screen with the eraser to restore normal functionality. Reset / Clear function cannot resolve this problem. This is clearly a issue. However, this issue does not occur when exporting as an image.

To Reproduce
This issue can be easily reproduced in the demo. Steps to reproduce the behavior:

  1. Draw freely and use the eraser to remove some traces.
  2. Export as SVG (for example, using the button in the demo).
  3. Clear/reset the entire canvas.
  4. Use the brush to draw again. Especially touch those areas earser touched before.
  5. See error.

Expected behavior
Normally, after tapping the screen and drawing again, we shouldn't see the traces of the previous eraser and brush.

Screenshots

First draw and erase as you want.

image
image

After exporting SVG and clear the canvas using demo's button.

image

Now we can redraw and find the trace of eraser before.

image

Desktop (please complete the following information):

  • OS: Mac Pro M1
  • Browser Chrome

Other context
Acutally I found another bug before, that "when I was drawing and use the eraser to clean the canvas, all of the things will be removed if I 1. click the screen twice rapidly, and 2. click it once again". This bug is due to the canvas in my app is set with 'width: 100%, height: 100%' and no actual size (like '500px') is given. This seems not a big issue as an extra user work can handle it. However, I believe this may be solved as well so I can give a more detailed description if you want in another issue.

However, The problem in this issue cannot be solved as before so it is probably not because of the outer setting. It must be a component level issue.

@LBruyne LBruyne changed the title Abnormal stroke after exporting SVG. Abnormal stroke after exporting SVG and cleaning: the eraser trace cannot be removed Oct 2, 2023
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

1 participant