I have a canvas:
Canvas = function(){ //v1.0
var o = this;
(o.penPos = {x: 0, y: 0},
o.pixelSize = 10,
o.pen = {style: "solid", size: 1, color: "#000"},
o.brush = {style: "solid", color: "#000"});
};
I am doing the following on click event:
document.onclick = function(e){
canvas.pixel(e.x, e.y);
}
but it doesn't show the co ordinates in correct position, I don't know what is going wrong, as I am new to UI designing.