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

eraser on background image doesn't work #20

Open
justinhunt opened this issue Nov 15, 2013 · 1 comment
Open

eraser on background image doesn't work #20

justinhunt opened this issue Nov 15, 2013 · 1 comment

Comments

@justinhunt
Copy link

The eraser does not work as expected when a background image is set. Even when the eraserColor is set to transparent, it erases the image with a color.

@manuhabitela
Copy link
Owner

Well, this is kinda tricky but, I just tested, this case seems to work "normally" for me.

Here is the thing: everything is drawn only on one canvas as for now (there is no "background layer"). So the current, not ideal but "normal" behavior is that the eraser will always erase the background too.

When you set "transparent" as the eraserColor, it will show the color of your website's background.
On http://leimi.github.io/drawingboard.js, it would show the gray background. Yeah, I could have called the "transparent" mode more like "destroyyyyyy".

As for now, the eraser won't erase anything if the eraserColor is set to "background" and the background is not a color.

Having some sort of second canvas layer that would be merge into the other one when needed (to export image as png for example) would be a better way to deal with the background.

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

2 participants