From 34c374fd08d24133dc51e7ad9c81e3ab17de0c90 Mon Sep 17 00:00:00 2001 From: Nicolas BADIA Date: Fri, 27 Sep 2013 14:57:13 +0200 Subject: [PATCH] Bumps version to 1.3.1 --- README.md | 4 ++-- image-scale.jquery.json | 2 +- image-scale.js | 4 ++-- image-scale.min.js | 18 +++++++++--------- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 7bdbe19..218fde3 100644 --- a/README.md +++ b/README.md @@ -178,7 +178,7 @@ You can also check out the Sproutcore [Automatic Image Scaling demo](http://show ## Size ## -Original Size: 3.26KB gzipped (10.19KB uncompressed) +Original Size: 3.33KB gzipped (10.43KB uncompressed) -Compiled Size: **1.55KB gzipped** (3.82KB uncompressed) +Compiled Size: **1.6KB gzipped** (3.94KB uncompressed) diff --git a/image-scale.jquery.json b/image-scale.jquery.json index 85f0b29..2dddc17 100755 --- a/image-scale.jquery.json +++ b/image-scale.jquery.json @@ -10,7 +10,7 @@ "responsive", "resize" ], - "version": "1.3", + "version": "1.3.1", "author": { "name": "GestiXi", "url": "https://github.com/GestiXi" diff --git a/image-scale.js b/image-scale.js index b3c540a..53783d6 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-2013 Nicolas BADIA // License: Licensed under the MIT license (see LICENCE) -// Version: 1.3 +// Version: 1.3.1 // ========================================================================== !function($) { "use strict"; @@ -411,7 +411,7 @@ /** @private - + Determines if the windows size has changed since the last update. @returns {Boolean} diff --git a/image-scale.min.js b/image-scale.min.js index b1d49b0..01c0341 100755 --- a/image-scale.min.js +++ b/image-scale.min.js @@ -1,9 +1,9 @@ -/*! image-scale v1.3 | ©2012-2013 Nicolas BADIA | Licensed under the MIT license */ -!function(e){e.fn.imageScale=function(b){return this.each(function(){var l=e(this),a=l.data("imageScale");if(!a){l.css("opacity",0);var d=l[0].complete,f=e.extend({},e.fn.imageScale.defaults,"object"==typeof b&&b),g=function(){l.data("imageScale",a=new m(this,f));f.rescaleOnResize&&(window.requestAnimationFrame||e(window).resize(function(b){a.scale()}));a.scale(!0);var b=f.callback;"function"===typeof b?b(l,a):b&&"object"===typeof b&&b.target[b.action].apply(b.target,[l,a])};d?g.apply(l[0]):l.load(g)}else if("string"== -typeof b)a[b]()})};e.fn.imageScale.defaults={scale:"best-fill",align:"center",parent:null,hideParentOverflow:!0,fadeInDuration:0,rescaleOnResize:!0,callback:null,debug:0};var m=function(b,l){this.options=l;this.element=b;var a=this.$element=e(b);this.elementWidth=a.attr("width")||b.width;this.elementHeight=a.attr("height")||b.height;this.$parent=l.parent?l.parent:e(e(b).parent()[0])};e.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",ALIGN_BOTTOM:"bottom",ALIGN_TOP_LEFT:"top-left",ALIGN_TOP_RIGHT:"top-right",ALIGN_BOTTOM_LEFT:"bottom-left",ALIGN_BOTTOM_RIGHT:"bottom-right",constructor:m,scale:function(b){if(!this._isDestroyed){var l=this,a=this.options,d=this.$parent,f=this.element,g=this.$element;b&&(a.hideParentOverflow&&d.css({overflow:"hidden"}),g.css({opacity:1}));if(a.rescaleOnResize&&(window.requestAnimationFrame&&requestAnimationFrame(function(){l.scale()}), -!this._needUpdate()))return;var k=d.outerWidth(),h=d.outerHeight(),c=d.innerWidth(),d=d.innerHeight(),c=k-c,d=h-d,e=g.attr("data-scale"),n=g.attr("data-align"),e=e?e:a.scale,m=n?n:a.align,n=a.fadeInDuration;if(e){this._cacheDestWidth===k&&this._cacheDestHeight===h&&2h?k:h;break;case this.BEST_FIT:b=kf||d>g?kk?e:k;break;case this.BEST_FIT:a=eg||f>h?e