Permalink
Browse files

Add new build.

  • Loading branch information...
1 parent 9de4055 commit 37ab8b44fa8a68aabcbddd7339fad854e9dd7ec5 Alex Michael committed Mar 22, 2012
Showing with 2 additions and 2 deletions.
  1. +1 −1 filtrr2/Jakefile.js
  2. +1 −1 filtrr2/dist/{filtrr2-0.4.1.min.js → filtrr2-0.4.2.min.js}
View
@@ -9,7 +9,7 @@ var exec = require('child_process').exec,
fs = require('fs');
// Increment this version number for new builds.
-FILTRR2_VERSION = "0.4.1"
+FILTRR2_VERSION = "0.4.2"
// Generates Docco documentation. Navigate into the filtrr2
// directory first and run this task. The newly created
@@ -1,4 +1,4 @@
-var F=function(a,b,d){var c=a[0].nodeName.toLowerCase(),f=a.position(),h=null,i=!1,g=b||null,b=function(){var b=new Image;b.src=a.attr("src");b.onload=$.proxy(function(){var c=$("<canvas>",{id:a.attr("id"),"class":a.attr("class"),style:a.attr("style")}).css({width:b.width,height:b.height,top:f.top,left:f.left}),d=c[0];this.canvas=c;d.width=b.width;d.height=b.height;this.context.drawImage(b,0,0);a.hide();a.parent().append(c);this.processor=new Filtrr2.ImageProcessor(this);g&&g.call(this.processor);
+var F=function(a,b,d){var c=a[0].nodeName.toLowerCase(),f=a.position(),h=null,i=!1,g=b||null,b=function(){var b=new Image;b.src=a.attr("src");b.onload=$.proxy(function(){var c=$("<canvas>",{id:a.attr("id"),"class":a.attr("class"),style:a.attr("style")}).css({width:b.width,height:b.height,top:f.top,left:f.left}),d=c[0];this.canvas=c;d.width=b.width;d.height=b.height;d.getContext("2d").drawImage(b,0,0);a.hide();a.parent().append(c);this.processor=new Filtrr2.ImageProcessor(this);g&&g.call(this.processor);
i=!0},this)};this.el=a;this.created=d;this.canvas=this.processor=null;h=new Filtrr2.Events;this.on=$.proxy(function(a,b){h.on(a,b,this)},this);this.off=h.off;this.trigger=h.trigger;this.ready=function(a){if(!a)return i;g=a;i&&g.call(this.ip)};this.update=function(a){a&&i&&a.call(this.processor)};this.save=function(a){var b="image/"+(a||"png");i&&(a=this.canvas[0].toDataURL(b),-1==a.indexOf(b)&&(b="image/png"),a=a.replace(b,"image/octet-stream"),window.location.href=a)};if("img"==c)b.call(this,a);
else if("canvas"==c)this.canvas=a,this.processor=new Filtrr2.ImageProcessor(this),g&&g.call(this.processor),i=!0;else throw Error("'"+c+"' is an invalid object.");return this},Filtrr2=function(){var a={};if(null==$("<canvas/>")[0].getContext("2d"))throw Error("Canvas is not supported in this browser.");return function(b,d){var c,f;if("undefined"===typeof b||null===b)throw Error("The element you gave Filtrr2 was not defined.");c=typeof b;f=b;key=(c="string"===c||"object"===c&&-1<b.constructor.toString().indexOf("String"))?
b:b.selector;if(a[key])return a[key].F;c&&(f=$(b));if(0===f.length)throw Error("Element not found.");c=(new Date).getTime();inst=new F(f,d,c);a[key]={timestamp:c,F:inst};return inst}}();Filtrr2.Events=function(){var a={};this.on=function(b,d,c){a[b]||(a[b]=[]);void 0===c&&(c=null);a[b].push({cback:d,ctx:c})};this.off=function(b,d){var c=0,f=[],h=null;if(a[b]&&0<a[b].length)if(d){f=a[b];for(c=0;c<f.length;c++)f.hasOwnProperty(c)&&(h=f[c],h.cback===d&&delete f[c])}else a[b]=[]};this.trigger=function(b){var d=a[b],c=null,f=null,h=[].slice.apply(arguments);for(c in d)d.hasOwnProperty(c)&&(f=d[c])&&f.cback.apply(f.ctx,h.slice(1))}};Filtrr2.FxStore=function(){var a={},b={},d=0;b.add=function(b,f){a[b]=f;d++};b.count=function(){return d};b.get=function(b){return a[b]};b.getNames=function(){var b=[],d=null;for(d in a)a.hasOwnProperty(d)&&b.push(d);return b};return b}();Filtrr2.fx=function(a,b){Filtrr2.FxStore.add(a,b)};

0 comments on commit 37ab8b4

Please sign in to comment.