I implemented a zoom in and out function on a canvas element. it works by scaling the canvas, translating it, and then redraw the whole scene again. the problem is that it t
added image into canvas
var image = new Image(); image.src = "1.jpg"; image.onload = function() { context.drawImage(image, 0, 0); };