steveruizok / perfect-freehand

Draw perfect pressure-sensitive freehand lines.
https://perfectfreehand.com
MIT License
4.52k stars 159 forks source link

Suggestion: clear selection #15

Closed AleksandrHovhannisyan closed 3 years ago

AleksandrHovhannisyan commented 3 years ago

As a user, I'd like to be able to drag-and-select an area on the canvas and delete a certain path. Motivation: Sometimes, the path I want to delete is too far back in history. I don't want to undo other work, but I also don't want to clear everything.

Maybe there could be a select tool/mode that users can toggle. In this mode, drawing is disabled, and dragging the mouse instead selects an area on the screen. The individual selection can then be deleted (I suppose there would need to be a separate icon for this to avoid confusion with the clear-all button).

By the way, thanks for making this excellent tool :)

steveruizok commented 3 years ago

Hey Aleksander, thanks for the idea. This example site is just meant as a quick demo for the library. If you want to have more control, I'd recommend trying out Excalidraw, which has implemented perfect-freehand. I also have a work in progress where you'll be able to do the kind of selection that you're asking about:

Kapture 2021-06-09 at 16 16 42

This project isn't quite ready, so it's currently only available for my Github sponsors.

Separate from that, I may be working on an "eraser" function for the library later this year. If I get that figured out, I'll have it implemented on the example site.

AleksandrHovhannisyan commented 3 years ago

Excalidraw is great! Did not know that your library powers its drawing tools. Thanks!

steveruizok commented 3 years ago

Just the free draw tool, rough.js handles the rest. :)

On 9 Jun 2021, at 16:33, Aleksandr Hovhannisyan @.***> wrote:

 Excalidraw is great! Did not know that your library powers its drawing tools. Thanks!

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub, or unsubscribe.