Updated dist files

This commit is contained in:
Luis Leiva 2016-11-27 21:34:18 +01:00
parent f43ee62991
commit 43fd8c49b8
2 changed files with 2 additions and 2 deletions

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
!function(a){function b(b){var c=a(b.target),d=c.offset();return{x:Math.round(b.pageX-d.left),y:Math.round(b.pageY-d.top)}}function c(a,b,c){b.coords[a]||(b.coords[a]=[]);var d=(new Date).getTime();b.options.relTimestamps&&(0===b.strokes.length&&0===b.coords[a].length&&(b.timestamp=d),d-=b.timestamp),b.coords[a].push([c.x,c.y,d,+b.sketch.isDrawing])}function d(a){return a.originalEvent.touches?!1:void k(a)}function e(a){return a.originalEvent.touches?!1:void l(a)}function f(a){return a.originalEvent.touches?!1:void m(a)}function g(b,c){var d=a(b.target),e=d.data(n),f=e.options,g=b.originalEvent.changedTouches;if(f.multitouch)for(var h=0;h<g.length;h++){var i=g[h];i.type=b.type,c(i)}else{var i=g[0];i.type=b.type,c(i)}}function h(a){g(a,k),a.preventDefault()}function i(a){g(a,l),a.preventDefault()}function j(a){g(a,m),a.preventDefault()}function k(d){if(3===d.which)return!1;var e=d.identifier||0,f=a(d.target),g=f.data(n),h=g.options;if(h.interactive){g.sketch.isDrawing=!0;var i=b(d);h.graphics.firstPointSize>0&&g.sketch.fillCircle(i.x,i.y,h.graphics.firstPointSize),g.coords[e]||(g.coords[e]=[]),g.coords[e].length>0&&(g.strokes.push(g.coords[e]),g.coords[e]=[]),c(e,g,i),"function"==typeof h.events.mousedown&&h.events.mousedown(f,g,d)}}function l(d){var e=d.identifier||0,f=a(d.target),g=f.data(n),h=g.options;if(h.interactive&&(h.mouseupMovements&&0!==g.strokes.length||g.sketch.isDrawing)){var i=b(d);if(g.sketch.isDrawing){var j=g.coords[e][g.coords[e].length-1];g.sketch.beginPath().line(j[0],j[1],i.x,i.y).stroke().closePath()}c(e,g,i),"function"==typeof h.events.mousemove&&h.events.mousemove(f,g,d)}}function m(b){var c=b.identifier||0,d=a(b.target),e=d.data(n),f=e.options;f.interactive&&(e.sketch.isDrawing=!1,e.strokes.push(e.coords[c]),e.coords[c]=[],"function"==typeof f.events.mouseup&&f.events.mouseup(d,e,b))}var n="sketchable",o={init:function(b){var c=a.extend(!0,{},a.fn.sketchable.defaults,b||{});return this.each(function(){var b=a(this),g=b.data(n);g||(c.interactive&&(b.bind("mousedown",d),b.bind("mousemove",e),b.bind("mouseup",f),b.bind("touchstart",h),b.bind("touchmove",i),b.bind("touchend",j),this.onselectstart=function(){return!1}),c.cssCursors&&(b[0].style.cursor=c.interactive?"pointer":"not-allowed"));var k=new jSketch(this,c.graphics);b.data(n,{strokes:[],coords:{},timestamp:(new Date).getTime(),sketch:k,options:c}),"function"==typeof c.events.init&&c.events.init(b,b.data(n))})},config:function(b){return this.each(function(){var c=a(this),d=c.data(n);d.options=a.extend(!0,{},a.fn.sketchable.defaults,b||{})})},strokes:function(b){if(b)return this.each(function(){var c=a(this),d=c.data(n);d.strokes=b});var c=a(this).data(n);return c.strokes},handler:function(b){return this.each(function(){var c=a(this),d=c.data(n);b(c,d)})},clear:function(){return this.each(function(){var b=a(this),c=b.data(n)||{},d=c.options;c.sketch&&(c.sketch.clear(),c.strokes=[],c.coords={}),d&&"function"==typeof d.events.clear&&d.events.clear(b,c)})},reset:function(b){return this.each(function(){var c=a(this),d=c.data(n)||{},e=d.options;c.sketchable("destroy").sketchable(b),e&&"function"==typeof e.events.reset&&e.events.reset(c,d)})},destroy:function(){return this.each(function(){var b=a(this),c=b.data(n)||{},g=c.options;g.interactive&&(b.unbind("mouseup",f),b.unbind("mousemove",e),b.unbind("mousedown",d),b.unbind("touchstart",h),b.unbind("touchmove",i),b.unbind("touchend",j)),b.removeData(n),g&&"function"==typeof g.events.destroy&&g.events.destroy(b,c)})}};a.fn.sketchable=function(b){return"methods functions hooks".split(" ").indexOf(b)>-1?o:o[b]?o[b].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof b&&b?(a.error("Method "+b+' does not exist. See jQuery.sketchable("methods").'),this):o.init.apply(this,arguments)},a.fn.sketchable.defaults={interactive:!0,mouseupMovements:!1,relTimestamps:!1,multitouch:!0,cssCursors:!0,events:{},graphics:{firstPointSize:3,lineWidth:3,strokeStyle:"#F0F",fillStyle:"#F0F",lineCap:"round",lineJoin:"round",miterLimit:10}}}(jQuery);
!function(a){function b(b){var c=a(b.target),d=c.offset();return{x:Math.round(b.pageX-d.left),y:Math.round(b.pageY-d.top)}}function c(a,b,c){b.coords[a]||(b.coords[a]=[]);var d=(new Date).getTime();b.options.relTimestamps&&(0===b.strokes.length&&0===b.coords[a].length&&(b.timestamp=d),d-=b.timestamp),b.coords[a].push([c.x,c.y,d,+b.sketch.isDrawing])}function d(a){return a.originalEvent.touches?!1:void k(a)}function e(a){return a.originalEvent.touches?!1:void l(a)}function f(a){return a.originalEvent.touches?!1:void m(a)}function g(b,c){var d=a(b.target),e=d.data(n),f=e.options,g=b.originalEvent.changedTouches;if(f.multitouch)for(var h=0;h<g.length;h++){var i=g[h];i.type=b.type,c(i)}else{var i=g[0];i.type=b.type,c(i)}}function h(a){g(a,k),a.preventDefault()}function i(a){g(a,l),a.preventDefault()}function j(a){g(a,m),a.preventDefault()}function k(d){if(3===d.which)return!1;var e=d.identifier||0,f=a(d.target),g=f.data(n),h=g.options;if(h.interactive){g.sketch.isDrawing=!0;var i=b(d);h.graphics.firstPointSize>0&&g.sketch.fillCircle(i.x,i.y,h.graphics.firstPointSize),g.coords[e]||(g.coords[e]=[]),g.coords[e].length>0&&(g.strokes.push(g.coords[e]),g.coords[e]=[]),c(e,g,i),"function"==typeof h.events.mousedown&&h.events.mousedown(f,g,d)}}function l(d){var e=d.identifier||0,f=a(d.target),g=f.data(n),h=g.options;if(h.interactive&&(h.mouseupMovements&&0!==g.strokes.length||g.sketch.isDrawing)){var i=b(d);if(g.sketch.isDrawing){var j=g.coords[e][g.coords[e].length-1];g.sketch.beginPath().line(j[0],j[1],i.x,i.y).stroke().closePath()}c(e,g,i),"function"==typeof h.events.mousemove&&h.events.mousemove(f,g,d)}}function m(b){var c=b.identifier||0,d=a(b.target),e=d.data(n),f=e.options;f.interactive&&(e.sketch.isDrawing=!1,e.strokes.push(e.coords[c]),e.coords[c]=[],"function"==typeof f.events.mouseup&&f.events.mouseup(d,e,b))}var n="sketchable",o={init:function(b){var c=a.extend(!0,{},a.fn.sketchable.defaults,b||{});return this.each(function(){var b=a(this),g=b.data(n);g||(c.interactive&&(b.bind("mousedown",d),b.bind("mousemove",e),b.bind("mouseup",f),b.bind("touchstart",h),b.bind("touchmove",i),b.bind("touchend",j),this.onselectstart=function(){return!1}),c.cssCursors&&(b[0].style.cursor=c.interactive?"pointer":"not-allowed"));var k=new jSketch(this,c.graphics);b.data(n,{strokes:[],coords:{},timestamp:(new Date).getTime(),sketch:k,options:c}),"function"==typeof c.events.init&&c.events.init(b,b.data(n))})},config:function(b){return this.each(function(){var c=a(this),d=c.data(n);d.options=a.extend(!0,b||{},a.fn.sketchable.defaults,d.options)})},strokes:function(b){if(b)return this.each(function(){var c=a(this),d=c.data(n);d.strokes=b});var c=a(this).data(n);return c.strokes},handler:function(b){return this.each(function(){var c=a(this),d=c.data(n);b(c,d)})},clear:function(){return this.each(function(){var b=a(this),c=b.data(n)||{},d=c.options;c.sketch&&(c.sketch.clear(),c.strokes=[],c.coords={}),d&&"function"==typeof d.events.clear&&d.events.clear(b,c)})},reset:function(b){return this.each(function(){var c=a(this),d=c.data(n)||{},e=d.options;c.sketchable("destroy").sketchable(b),e&&"function"==typeof e.events.reset&&e.events.reset(c,d)})},destroy:function(){return this.each(function(){var b=a(this),c=b.data(n)||{},g=c.options;g.interactive&&(b.unbind("mouseup",f),b.unbind("mousemove",e),b.unbind("mousedown",d),b.unbind("touchstart",h),b.unbind("touchmove",i),b.unbind("touchend",j)),b.removeData(n),g&&"function"==typeof g.events.destroy&&g.events.destroy(b,c)})}};a.fn.sketchable=function(b){return"methods functions hooks".split(" ").indexOf(b)>-1?o:o[b]?o[b].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof b&&b?(a.error("Method "+b+' does not exist. See jQuery.sketchable("methods").'),this):o.init.apply(this,arguments)},a.fn.sketchable.defaults={interactive:!0,mouseupMovements:!1,relTimestamps:!1,multitouch:!0,cssCursors:!0,events:{},graphics:{firstPointSize:3,lineWidth:3,strokeStyle:"#F0F",fillStyle:"#F0F",lineCap:"round",lineJoin:"round",miterLimit:10}}}(jQuery);