Continue Edit Sketching Image Using Sketch.js
I am using example from sketch.js(http://intridea.github.io/sketch.js/) to draw sketching and able to save it in directory as an image file. The problem is how to continue editing
Solution 1:
//declare an array
var canvas;
$('#buttonSave').click(function () {
//saves all actions you made in your canvas
canvas = $('#canvasId').sketch().actions
});
$('#buttonRetrieve').click(function () {
//iterates through your array, adds and redraws each action
$.each(canvas, function (i, val) {
$('#canvasId').sketch().actions.push(val);
$('#canvasId').sketch().redraw();
});
});
Post a Comment for "Continue Edit Sketching Image Using Sketch.js"