I have a canvas element with an image into.
Now I try to rotate the image in the canvas when I click a button:
$("#rotateC").live('click',function(e) {
e.preventDefault();
console.log("rotateC");
Pixastic.process(firstImg, 'rotate',
{
'angle': +90,
'leaveDOM': true
},
function(firstImg) {
ctx.drawImage(firstImg, 0, 0);
}
);
});
The image will rotate once and then if I click the button again, nothing happens.
Do you know what the problem is?