steveruizok / perfect-freehand

Draw perfect pressure-sensitive freehand lines.

Home Page:https://perfectfreehand.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Suggestion: clear selection

AleksandrHovhannisyan opened this issue · comments

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 :)

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.

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