To keep a browser thin and clear, especially in mobile devices, you should destroy/remove old canvas before return in getDataURL() function.
Some think like that:
var imageData = canvas.toDataURL('image/png');
context.clearRect(0, 0, canvas.width, canvas.height);
return imageData;
To keep a browser thin and clear, especially in mobile devices, you should destroy/remove old canvas before return in getDataURL() function. Some think like that:
var imageData = canvas.toDataURL('image/png'); context.clearRect(0, 0, canvas.width, canvas.height); return imageData;