I am using below code for populating the previously saved sketch and trying to edit it, but it got refresh as soon as I start sketching over. May I know how to get this working properly!
var ctx = document.getElementById('colors_sketch').getContext('2d');
var img = new Image;
img.onload = function(){
ctx.drawImage(this,0,0);
$('#colors_sketch').sketch();
};
img.src = 'data:image/png;base64,iVBORw0KG.....'
I am using below code for populating the previously saved sketch and trying to edit it, but it got refresh as soon as I start sketching over. May I know how to get this working properly!
var ctx = document.getElementById('colors_sketch').getContext('2d'); var img = new Image; img.onload = function(){ ctx.drawImage(this,0,0); $('#colors_sketch').sketch(); }; img.src = 'data:image/png;base64,iVBORw0KG.....'