//declare an arrayvar 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(); });});
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)