webfactorymk/ng2-canvas-whiteboard

Transparent canvas

Closed this issue · 2 comments

It would be nice if we have input param for leaving the canvas background transparent instead of setting default color.

Did you try to make the startingColor="'transparent'" ?

I made a few pictures with that Input and it seemed to work properly.
I added an absolute div element that should show behind the canvas (the same z index, but the canvas is later in the hierarchy), when i set the startingColor input to 'transparent' the div text showed correctly

Picture 1: startingColor is '#fff'

screenshot at jun 19 18-14-45

Picture 2: startingColor is 'transparent'

screenshot at jun 19 18-17-24

Picture 3: Body background color (the first canvas has startingColor: 'transparent', the second has '#fff'

screen shot 2018-06-19 at 6 28 43 pm

@Peshou
It's working, I should have tried this

Thanks, btw, nice lib, keep good work on it :)