diff --git a/README.md b/README.md index 7a3e1c5..9924586 100644 --- a/README.md +++ b/README.md @@ -196,9 +196,9 @@ You can also check out the Sproutcore [Automatic Image Scaling demo](http://show ## Size -Original Size: 3.91KB gzipped (13.99KB uncompressed) +Original Size: 4.3KB gzipped (15.04KB uncompressed) -Compiled Size: **1.8KB gzipped** (4.42KB uncompressed) +Compiled Size: **1.9KB gzipped** (4.65KB uncompressed) ------ diff --git a/image-scale.jquery.json b/image-scale.jquery.json index 7bcdf7d..12f0b69 100755 --- a/image-scale.jquery.json +++ b/image-scale.jquery.json @@ -10,7 +10,7 @@ "responsive", "resize" ], - "version": "2.1", + "version": "2.2", "author": { "name": "GestiXi", "url": "https://github.com/gestixi" diff --git a/image-scale.js b/image-scale.js index d008c81..aef57c5 100755 --- a/image-scale.js +++ b/image-scale.js @@ -3,7 +3,7 @@ // Description: Scale images to fit or fill any target size via two simple properties: scale and align. // Copyright: ©2012-2016 GestiXi // License: Licensed under the MIT license (see LICENCE) -// Version: 2.1 +// Version: 2.2 // Author: Nicolas BADIA // ========================================================================== diff --git a/image-scale.min.js b/image-scale.min.js index f7e034f..ea8404b 100755 --- a/image-scale.min.js +++ b/image-scale.min.js @@ -1,4 +1,4 @@ -/*! image-scale v2.1 | ©2012-2016 GestiXi | Licensed under the MIT license */ +/*! image-scale v2.2 | ©2012-2016 GestiXi | Licensed under the MIT license */ (function(l){"function"===typeof define&&define.amd?define(["jquery"],l):"object"===typeof module&&module.exports?module.exports=function(m,a){void 0===a&&(a="undefined"!==typeof window?require("jquery"):require("jquery")(m));l(a);return a}:l(jQuery)})(function(l){l.fn.imageScale=function(a){return this.each(function(){var f=this,d=l(this),b=d.data("imageScale"),g="IMG"===this.tagName?d:d.find("img");if(b)if("string"==typeof a)b[a]();else if("object"==typeof a)b[a.method||"scale"](!1,a);else b.scale(); else{var e=g[0].complete,k=l.extend({},l.fn.imageScale.defaults,"object"==typeof a&&a),h=function(){d.data("imageScale",b=new m(f,k));b.scale(!0,k)};e?h.apply(d[0]):g.on("load",h).attr("src",g.attr("src"))}})};l.fn.imageScale.defaults={scale:"best-fill",align:"center",parent:null,hideParentOverflow:!0,fadeInDuration:0,rescaleOnResize:!1,didScale:function(a,f){},logLevel:0};var m=function(a,f){var d=this;d.options=f;d.element=a;var b=d.$element=l(a),g=d.$img="IMG"===a.tagName?b:b.find("img"),e=d.img= g[0];d.src=g.attr("src");d.imgWidth=e.naturalWidth||e.width;d.imgHeight=e.naturalHeight||e.height;b=d.$parent=f.parent?f.parent:l(b.parent()[0]);d.parent=b[0];"static"===b.css("position")&&b.css("position","relative");f.rescaleOnResize&&l(window).resize(function(a){d.scheduleScale()})};l.fn.imageScale.Constructor=m;m.prototype={NONE:"none",FILL:"fill",BEST_FILL:"best-fill",BEST_FIT:"best-fit",BEST_FIT_DOWN_ONLY:"best-fit-down",ALIGN_LEFT:"left",ALIGN_RIGHT:"right",ALIGN_CENTER:"center",ALIGN_TOP:"top", diff --git a/package.json b/package.json index d44740a..5290ca3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "image-scale", - "version": "2.1.0", + "version": "2.2.0", "description": "Scale images to fit or fill any target container via two simple properties: scale and align.", "main": "image-scale.js", "scripts": {