Butterfly
Butterfly copied to clipboard
[Bug]: Using path eraser inside of a shape deletes the shape
What happened?
Previously in 2.2.4, the path eraser would only erase a shape when the eraser contacted one of the shape's edges. In 2.3.0-beta.4, placing the path eraser anywhere inside of the shape causes it to be removed. Probably related to the changes in https://github.com/LinwoodDev/Butterfly/commit/44f09ea5f25eac031e2d541747236806f8b613ef
I experienced this behavior both with and without "Delete elements" checked on the path eraser tool.
If this behavior is intended, then I think it should be reevaluated. I imagine that a common use-case for shapes is to place other elements inside them (like text inside of flowchart nodes, or drawings inside of a frame), and this makes it impossible to erase elements inside of a shape without erasing the shape as well.
https://github.com/user-attachments/assets/5db6b504-d3e5-4bfa-bbd1-0e737dd468ba
Version
2.3.0-beta.4
Platform
Android
Relevant log output
Code of Conduct
- [x] I agree to follow this project's Code of Conduct
Yes it was intended since if you want to have a fill, I thought its nkt clear that it only deletes the shape if you click on the edges.
But i see your concern here. Do you want to change this?
I can definitely see how that would be confusing in some scenarios! Let me think on this... maybe an additional tool setting would help...
By the way, is it a bug that the path eraser deletes shapes when Delete Elements is not checked? If so, fixing that could be a quick compromise for this issue!
Hmm an additional tool would be too much i think. Im also okay if we simple revert the change for shapes.
I categorized the shape elements to the same group as the pen elements so its intentional. If you draw and have shapes for some mindmaps or others, you can use the same eraser for this. But im also okay if we make a new option deleteShapes
Got it! Yeah I meant an additional setting for the same tool. I'll make a prototype and we can see if we like it.
Hey! So I thought it would be best to give the user 3 options:
- Don't erase shapes
- Erase shapes by touching edges only (2.2.4 behavior)
- Erase shapes by touching any part of them (current behavior)
Do you agree that we should allow the user to pick between those three 3 options (with better phrasing of course)?
I also made a few UI prototypes. My favorite is option 1, but let me know if you have any opinions about them! (btw I'm not happy with the phrasing of the options in the UI yet, so please ignore them. Also all of these prototypes are built on the assumption that the user should be presented with 3 options, so if you disagreed with that, then you can ignore all of this.)
1) No checkbox
My thoughts: This is my favorite option. I do wish there was a checkbox, but I think it is the least-confusing and least-ugly option. Also this is the only option where an icon on the left would make sense, which is always fun.
https://github.com/user-attachments/assets/0b5b3aa0-066f-4a22-8ee5-cead577e1733
2) With checkbox
My thoughts: This is pretty, but I think it's not obvious that it's actually a dropdown. The user could just tap the checkbox and still have no idea that there are more options.
https://github.com/user-attachments/assets/b943022d-522b-4e90-b7ff-7bd91073836d
3) Reversed checkbox (similar to the Pen tool's Shape Detection settings)
My thoughts: Although it is easy to understand the nature of the controls, I think it doesn't fit-in with the rest of the UI, especially since the setting right below it has its checkbox on the opposite side. So it's easy to understand in isolation, but makes the page as a whole difficult to parse.
https://github.com/user-attachments/assets/9c46d703-2541-42af-a7f2-07045435dfdc
Hi, Im currently thinking about: we also need to add it to any tool that uses raycast (like selection and the other eraser).
Is it better to make the corner setting a setting like full selection?
If we put it in the tool, i also like the first ui maybe we can also use it on other places
FYI I'm working on this and I think I found a solution that can use the new polygon projection raycasting method and still detect only edge collisions (if the user has selected that). I doubt it will be ready before 2.3.0, but I'll keep you posted!