drawingboard.js icon indicating copy to clipboard operation
drawingboard.js copied to clipboard

Hold Shift to draw straight

Open jlvallelonga opened this issue 10 years ago • 2 comments

would be a cool feature

jlvallelonga avatar Sep 26 '13 04:09 jlvallelonga

I forked the latest code and implemented holding shift and drawing a straight line / using an eraser in a straight line.

https://github.com/Samangan/drawingboard.js

The problem is that with only 1 canvas to draw on you will not be able to see the line being drawn as you move your pointer. You will only see the finished line after you stop drawing the line (it was either this or show the line being drawn and keep it on the canvas forever with the straight line finished product). Normally 2 canvases are used where one is used as a temporary canvas to draw the animation path and then is deleted on mouseup event. I will start to think of an alternative to this as I think that using 2 canvases would be a pretty big change.

de-husk avatar Oct 05 '13 00:10 de-husk

Hey, cool to see that!

You're right, having another canvas would be a pretty big change but that would also let us add other features in a more easy way too.

Currently don't have that much of free time though, and I want to correct the few bugs here and there before adding this.

manuhabitela avatar Oct 07 '13 07:10 manuhabitela