I used canvas to draw "X" word at a mouse position when I clicked, but when I draw new "X" word, the old "X" was "BOLD".
http://jsfiddle.net/darklight27/h4JvJ/
Do you have any suggestion for me? Thank you!!!
Before you begin to draw your lines, call beginPath()
:
function drawX(x, y) {
ctx.beginPath();
ctx.moveTo(x - 20, y - 20);
ctx.lineTo(x + 20, y + 20);
ctx.moveTo(x + 20, y - 20);
ctx.lineTo(x - 20, y + 20);
ctx.stroke();
}
Updated code on jsFiddle: http://jsfiddle.net/h4JvJ/23/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With