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

Add optional arg to duplicate / clone canvas #6

Open
agilgur5 opened this issue May 1, 2019 · 0 comments · May be fixed by #7
Open

Add optional arg to duplicate / clone canvas #6

agilgur5 opened this issue May 1, 2019 · 0 comments · May be fixed by #7
Labels

Comments

@agilgur5
Copy link
Owner

agilgur5 commented May 1, 2019

i.e. trimCanvas(canvas, {duplicate: true}).

Given the intense demand seen by the number of upvotes on szimek/signature_pad#49 (comment) it seems like it should be included by default.

I'm also reading through my own docs for the first time in a while and if you don't know how canvas or cloning works, it may be quite unintuitive.

It's only a handful of lines of code, but IIRC the reason why I didn't include it (or removed it rather) was because it introduced a dependency on canvas, meaning it wouldn't work in Node (requires a pretty massive native dependency). If it's hidden behind an optional flag though, this shouldn't be problematic.
This is something I've been thinking of adding for a while (in my backlog, ofc), but I also happened to see https://github.com/lukechilds/merge-images#nodejs-usage today, which is another interesting workaround for Node usage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
1 participant