mirror of https://github.com/luileito/jsketch.git
Updated dist files
This commit is contained in:
parent
71ddda45a2
commit
4c44427e19
|
|
@ -1 +1 @@
|
|||
!function(a){function b(a){function b(b,c,d){var f=c[d],g=c[d+1];if(0===d||f.strokeId!==g.strokeId){if(b.data.firstPointSize){var i=d>0?g:f;b.beginFill(b.data.strokeStyle).fillCircle(i.x,i.y,b.data.firstPointSize).endFill()}d>0&&"function"==typeof h.animationstep&&h.animationstep(a,e),b.closePath().beginPath()}f.strokeId===g.strokeId&&b.line(f.x,f.y,g.x,g.y).stroke()}function d(a){return a instanceof Array?{x:a[0],y:a[1],time:a[2],strokeId:a[4]}:a}for(var e=a.data(c),f=e.sketch,g=e.strokes,h=e.options.events,i=e.options.graphics,j=[],k=0;k<g.length;k++)for(var l=g[k],m=0;m<l.length;m++){var n=d(l[m]);n.strokeId||(n.strokeId=k),j.push(n)}"function"==typeof h.animationstart&&h.animationstart(a,e);var o,p=0;f.lineStyle(i.strokeStyle,i.lineWidth),function q(){o=requestAnimationFrame(q);try{b(f,j,p,i)}catch(c){console.error(c),cancelAnimationFrame(o)}++p===j.length-1&&(cancelAnimationFrame(o),"function"==typeof h.animationend&&h.animationend(a,e))}(),this.cancel=function(){return cancelAnimationFrame(o),this}}var c="sketchable";a.fn.sketchable.plugins.animate=function(d){function e(a){if(!f.options["_bound.animate$"+a])if(f.options["_bound.animate$"+a]=!0,f.options.events&&"function"==typeof f.options.events[a]){var b=f.options.events[a];f.options.events[a]=function(){b.apply(d,arguments),g[a].apply(d,arguments)}}else f.options.events[a]=g[a]}for(var f=d.sketchable("config"),g={clear:function(a,b){b.animate&&b.animate.cancel()},destroy:function(a,b){b.animate&&b.animate.cancel()}},h="clear destroy".split(" "),i=0;i<h.length;i++)e(h[i]);a.extend(a.fn.sketchable.api,{animate:{strokes:function(){var e=a(this).data(c);return e.animate=new b(d),d}}})}}(jQuery);
|
||||
!function(a){function b(a){function b(b,c,d){var f=c[d],g=c[d+1];if(0===d||f.strokeId!==g.strokeId){if(b.data.firstPointSize){var i=d>0?g:f;b.beginFill(b.data.strokeStyle).fillCircle(i.x,i.y,b.data.firstPointSize).endFill()}d>0&&"function"==typeof h.animationstep&&h.animationstep(a,e),b.closePath().beginPath()}f.strokeId===g.strokeId&&b.line(f.x,f.y,g.x,g.y).stroke()}function d(a){return a instanceof Array?{x:a[0],y:a[1],time:a[2],strokeId:a[4]}:a}for(var e=a.data(c),f=e.sketch,g=e.strokes,h=e.options.events,i=e.options.graphics,j=[],k=0;k<g.length;k++)for(var l=g[k],m=0;m<l.length;m++){var n=d(l[m]);n.strokeId||(n.strokeId=k),j.push(n)}"function"==typeof h.animationstart&&h.animationstart(a,e);var o,p=0;f.lineStyle(i.strokeStyle,i.lineWidth),function q(){o=requestAnimationFrame(q);try{b(f,j,p,i)}catch(c){console.error(c),cancelAnimationFrame(o)}++p===j.length-1&&(cancelAnimationFrame(o),"function"==typeof h.animationend&&h.animationend(a,e))}(),this.cancel=function(){return cancelAnimationFrame(o),this}}var c="sketchable";a.fn.sketchable.plugins.animate=function(d){for(var e=(d.sketchable("config"),{clear:function(a,b){b.animate&&b.animate.cancel()},destroy:function(a,b){b.animate&&b.animate.cancel()}}),f="clear destroy".split(" "),g=0;g<f.length;g++){var h=f[g];d.sketchable("decorate",h,e[h],"animate")}a.extend(a.fn.sketchable.api,{animate:{strokes:function(){var e=a(this).data(c);return e.animate=new b(d),d}}})}}(jQuery);
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -1 +1 @@
|
|||
!function(a){function b(b){function c(a,c){b.sketchable("handler",function(b,d){d.sketch.clear(),d.sketch.context.drawImage(a,0,0),d.strokes=c.slice()})}function d(a){if(a.ctrlKey)switch(a.which){case 26:a.shiftKey?g.redo():g.undo();break;case 25:g.redo()}}var e=[],f=-1,g=this;this.undo=function(){return f>0&&(f--,this.restore()),this},this.redo=function(){return f<e.length-1&&(f++,this.restore()),this},this.reset=function(){return e=[],f=-1,this.save()},this.save=function(a){return b.sketchable("handler",function(b,c){a&&a.identifier>0?e[f].strokes=c.strokes.slice():(e.push({image:b[0].toDataURL(),strokes:c.strokes.slice()}),f++)}),this},this.state=function(){return JSON.parse(JSON.stringify(e[f]))},this.restore=function(a){a||(a=e[f]);var b=new Image;return b.src=a.image,b.onload=function(){c(this,a.strokes)},this},this.init=function(){return a(document).off("keypress",d),a(document).on("keypress",d),this.save()},this.destroy=function(){return a(document).off("keypress",d),this.reset()}}var c="sketchable";a.fn.sketchable.plugins.memento=function(d){function e(a){if(!f.options["_bound.memento$"+a])if(f.options["_bound.memento$"+a]=!0,f.options.events&&"function"==typeof f.options.events[a]){var b=f.options.events[a];f.options.events[a]=function(){b.apply(d,arguments),g[a].apply(d,arguments)}}else f.options.events[a]=g[a]}for(var f=d.sketchable("config"),g={clear:function(a,b){b.memento.reset()},mouseup:function(a,b,c){b.memento.save(c)},destroy:function(a,b){b.memento.destroy()}},h="mouseup clear destroy".split(" "),i=0;i<h.length;i++)e(h[i]);a.extend(a.fn.sketchable.api,{memento:{undo:function(){var b=a(this).data(c);return b.memento.undo(),d},redo:function(){var b=a(this).data(c);return b.memento.redo(),d},save:function(){var b=a(this).data(c);return b.memento.save(),d},state:function(){var b=a(this).data(c);return b.memento.state()},restore:function(b){var e=a(this).data(c);return e.memento.restore(b),d}}}),f.memento=new b(d),f.memento.init()}}(jQuery);
|
||||
!function(a){function b(b){function c(a,c){b.sketchable("handler",function(b,d){d.sketch.clear(),d.sketch.context.drawImage(a,0,0),d.strokes=c.slice()})}function d(a){if(a.ctrlKey)switch(a.which){case 26:a.shiftKey?g.redo():g.undo();break;case 25:g.redo()}}var e=[],f=-1,g=this;this.undo=function(){return f>0&&(f--,this.restore()),this},this.redo=function(){return f<e.length-1&&(f++,this.restore()),this},this.reset=function(){return e=[],f=-1,this.save()},this.save=function(a){return b.sketchable("handler",function(b,c){a&&a.identifier>0?e[f].strokes=c.strokes.slice():(e.push({image:b[0].toDataURL(),strokes:c.strokes.slice()}),f++)}),this},this.state=function(){return JSON.parse(JSON.stringify(e[f]))},this.restore=function(a){a||(a=e[f]);var b=new Image;return b.src=a.image,b.onload=function(){c(this,a.strokes)},this},this.init=function(){return a(document).off("keypress",d),a(document).on("keypress",d),this.save()},this.destroy=function(){return a(document).off("keypress",d),this.reset()}}var c="sketchable";a.fn.sketchable.plugins.memento=function(d){for(var e=d.sketchable("config"),f={clear:function(a,b){b.memento.reset()},mouseup:function(a,b,c){b.memento.save(c)},destroy:function(a,b){b.memento.destroy()}},g="mouseup clear destroy".split(" "),h=0;h<g.length;h++){var i=g[h];d.sketchable("decorate",i,f[i],"memento")}a.extend(a.fn.sketchable.api,{memento:{undo:function(){var b=a(this).data(c);return b.memento.undo(),d},redo:function(){var b=a(this).data(c);return b.memento.redo(),d},save:function(){var b=a(this).data(c);return b.memento.save(),d},state:function(){var b=a(this).data(c);return b.memento.state()},restore:function(b){var e=a(this).data(c);return e.memento.restore(b),d}}}),e.memento=new b(d),e.memento.init()}}(jQuery);
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -1 +1 @@
|
|||
!function(a){function b(a){function b(b,c,d){var f=c[d],g=c[d+1];if(0===d||f.strokeId!==g.strokeId){if(b.data.firstPointSize){var i=d>0?g:f;b.beginFill(b.data.strokeStyle).fillCircle(i.x,i.y,b.data.firstPointSize).endFill()}d>0&&"function"==typeof h.animationstep&&h.animationstep(a,e),b.closePath().beginPath()}f.strokeId===g.strokeId&&b.line(f.x,f.y,g.x,g.y).stroke()}function d(a){return a instanceof Array?{x:a[0],y:a[1],time:a[2],strokeId:a[4]}:a}for(var e=dataBind(a.elem)[c],f=e.sketch,g=e.strokes,h=e.options.events,i=e.options.graphics,j=[],k=0;k<g.length;k++)for(var l=g[k],m=0;m<l.length;m++){var n=d(l[m]);n.strokeId||(n.strokeId=k),j.push(n)}"function"==typeof h.animationstart&&h.animationstart(a,e);var o,p=0;f.lineStyle(i.strokeStyle,i.lineWidth),function q(){o=requestAnimationFrame(q);try{b(f,j,p,i)}catch(c){console.error(c),cancelAnimationFrame(o)}++p===j.length-1&&(cancelAnimationFrame(o),"function"==typeof h.animationend&&h.animationend(a,e))}(),this.cancel=function(){return cancelAnimationFrame(o),this}}var c="sketchable";Sketchable.prototype.plugins.animate=function(a){function d(b){if(!e.options["_bound.animate$"+b])if(e.options["_bound.animate$"+b]=!0,e.options.events&&"function"==typeof e.options.events[b]){var c=e.options.events[b];e.options.events[b]=function(){c.apply(a,arguments),f[b].apply(a,arguments)}}else e.options.events[b]=f[b]}for(var e=a.config(),f={clear:function(a,b){b.animate&&b.animate.cancel()},destroy:function(a,b){b.animate&&b.animate.cancel()}},g="clear destroy".split(" "),h=0;h<g.length;h++)d(g[h]);deepExtend(a,{animate:{strokes:function(){var d=dataBind(a.elem)[c];return d.animate=new b(a),a}}})}}(this);
|
||||
!function(a){function b(a){function b(b,c,d){var f=c[d],g=c[d+1];if(0===d||f.strokeId!==g.strokeId){if(b.data.firstPointSize){var i=d>0?g:f;b.beginFill(b.data.strokeStyle).fillCircle(i.x,i.y,b.data.firstPointSize).endFill()}d>0&&"function"==typeof h.animationstep&&h.animationstep(a,e),b.closePath().beginPath()}f.strokeId===g.strokeId&&b.line(f.x,f.y,g.x,g.y).stroke()}function d(a){return a instanceof Array?{x:a[0],y:a[1],time:a[2],strokeId:a[4]}:a}for(var e=dataBind(a.elem)[c],f=e.sketch,g=e.strokes,h=e.options.events,i=e.options.graphics,j=[],k=0;k<g.length;k++)for(var l=g[k],m=0;m<l.length;m++){var n=d(l[m]);n.strokeId||(n.strokeId=k),j.push(n)}"function"==typeof h.animationstart&&h.animationstart(a,e);var o,p=0;f.lineStyle(i.strokeStyle,i.lineWidth),function q(){o=requestAnimationFrame(q);try{b(f,j,p,i)}catch(c){console.error(c),cancelAnimationFrame(o)}++p===j.length-1&&(cancelAnimationFrame(o),"function"==typeof h.animationend&&h.animationend(a,e))}(),this.cancel=function(){return cancelAnimationFrame(o),this}}var c="sketchable";Sketchable.prototype.plugins.animate=function(a){for(var d=(a.config(),{clear:function(a,b){b.animate&&b.animate.cancel()},destroy:function(a,b){b.animate&&b.animate.cancel()}}),e="clear destroy".split(" "),f=0;f<e.length;f++){var g=e[f];a.decorate(g,d[g],"animate")}deepExtend(a,{animate:{strokes:function(){var d=dataBind(a.elem)[c];return d.animate=new b(a),a}}})}}(this);
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -1 +1 @@
|
|||
!function(a){function b(a){function b(b,c){a.handler(function(a,d){d.sketch.clear(),d.sketch.context.drawImage(b,0,0),d.strokes=c.slice()})}function c(a){if(a.ctrlKey)switch(a.which){case 26:a.shiftKey?f.redo():f.undo();break;case 25:f.redo()}}var d=[],e=-1,f=this;this.undo=function(){return e>0&&(e--,this.restore()),this},this.redo=function(){return e<d.length-1&&(e++,this.restore()),this},this.reset=function(){return d=[],e=-1,this.save()},this.save=function(b){return a.handler(function(a,c){b&&b.identifier>0?d[e].strokes=c.strokes.slice():(d.push({image:a.toDataURL(),strokes:c.strokes.slice()}),e++)}),this},this.state=function(){return JSON.parse(JSON.stringify(d[e]))},this.restore=function(a){a||(a=d[e]);var c=new Image;return c.src=a.image,c.onload=function(){b(this,a.strokes)},this},this.init=function(){return Event.remove(document,"keypress",c),Event.add(document,"keypress",c),this.save()},this.destroy=function(){return Event.remove(document,"keypress",c),this.reset()}}var c="sketchable";Sketchable.prototype.plugins.memento=function(a){function d(b){if(!e.options["_bound.memento$"+b])if(e.options["_bound.memento$"+b]=!0,e.options.events&&"function"==typeof e.options.events[b]){var c=e.options.events[b];e.options.events[b]=function(){c.apply(a,arguments),f[b].apply(a,arguments)}}else e.options.events[b]=f[b]}for(var e=a.config(),f={clear:function(a,b){b.memento.reset()},mouseup:function(a,b,c){b.memento.save(c)},destroy:function(a,b){b.memento.destroy()}},g="mouseup clear destroy".split(" "),h=0;h<g.length;h++)d(g[h]);deepExtend(a,{memento:{undo:function(){var b=dataBind(a.elem)[c];return b.memento.undo(),a},redo:function(){var b=dataBind(a.elem)[c];return b.memento.redo(),a},save:function(){var b=dataBind(a.elem)[c];return b.memento.save(),a},state:function(){var b=dataBind(a.elem)[c];return b.memento.state()},restore:function(b){var d=dataBind(a.elem)[c];return d.memento.restore(b),a}}}),e.memento=new b(a),e.memento.init()}}(this);
|
||||
!function(a){function b(a){function b(b,c){a.handler(function(a,d){d.sketch.clear(),d.sketch.context.drawImage(b,0,0),d.strokes=c.slice()})}function c(a){if(a.ctrlKey)switch(a.which){case 26:a.shiftKey?f.redo():f.undo();break;case 25:f.redo()}}var d=[],e=-1,f=this;this.undo=function(){return e>0&&(e--,this.restore()),this},this.redo=function(){return e<d.length-1&&(e++,this.restore()),this},this.reset=function(){return d=[],e=-1,this.save()},this.save=function(b){return a.handler(function(a,c){b&&b.identifier>0?d[e].strokes=c.strokes.slice():(d.push({image:a.toDataURL(),strokes:c.strokes.slice()}),e++)}),this},this.state=function(){return JSON.parse(JSON.stringify(d[e]))},this.restore=function(a){a||(a=d[e]);var c=new Image;return c.src=a.image,c.onload=function(){b(this,a.strokes)},this},this.init=function(){return Event.remove(document,"keypress",c),Event.add(document,"keypress",c),this.save()},this.destroy=function(){return Event.remove(document,"keypress",c),this.reset()}}var c="sketchable";Sketchable.prototype.plugins.memento=function(a){for(var d=a.config(),e={clear:function(a,b){b.memento.reset()},mouseup:function(a,b,c){b.memento.save(c)},destroy:function(a,b){b.memento.destroy()}},f="mouseup clear destroy".split(" "),g=0;g<f.length;g++){var h=f[g];a.decorate(h,e[h],"memento")}deepExtend(a,{memento:{undo:function(){var b=dataBind(a.elem)[c];return b.memento.undo(),a},redo:function(){var b=dataBind(a.elem)[c];return b.memento.redo(),a},save:function(){var b=dataBind(a.elem)[c];return b.memento.save(),a},state:function(){var b=dataBind(a.elem)[c];return b.memento.state()},restore:function(b){var d=dataBind(a.elem)[c];return d.memento.restore(b),a}}}),d.memento=new b(a),d.memento.init()}}(this);
|
||||
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue