vendor/assets/javascripts/packery.pkgd.js in packery-rails-1.4.2 vs vendor/assets/javascripts/packery.pkgd.js in packery-rails-1.4.3

- old
+ new

@@ -1,7 +1,7 @@ /*! - * Packery PACKAGED v1.4.2 + * Packery PACKAGED v1.4.3 * bin-packing layout library * * Licensed GPLv3 for open source use * or Flickity Commercial License for commercial use * @@ -1722,16 +1722,16 @@ var layoutOptions = this.layout.options; var isOriginLeft = layoutOptions.isOriginLeft; var isOriginTop = layoutOptions.isOriginTop; var xValue = style[ isOriginLeft ? 'left' : 'right' ]; var yValue = style[ isOriginTop ? 'top' : 'bottom' ]; - var x = parseInt( xValue, 10 ); - var y = parseInt( yValue, 10 ); // convert percent to pixels var layoutSize = this.layout.size; - x = xValue.indexOf('%') != -1 ? ( x / 100 ) * layoutSize.width : x; - y = yValue.indexOf('%') != -1 ? ( y / 100 ) * layoutSize.height : y; + var x = xValue.indexOf('%') != -1 ? + ( parseFloat( xValue ) / 100 ) * layoutSize.width : parseInt( xValue, 10 ); + var y = yValue.indexOf('%') != -1 ? + ( parseFloat( yValue ) / 100 ) * layoutSize.height : parseInt( yValue, 10 ); // clean up 'auto' or other non-integer values x = isNaN( x ) ? 0 : x; y = isNaN( y ) ? 0 : y; // remove padding from measurement @@ -1823,18 +1823,16 @@ Item.prototype.getTranslate = function( x, y ) { // flip cooridinates if origin on right or bottom var layoutOptions = this.layout.options; x = layoutOptions.isOriginLeft ? x : -x; y = layoutOptions.isOriginTop ? y : -y; - x = this.getXValue( x ); - y = this.getYValue( y ); if ( is3d ) { - return 'translate3d(' + x + ', ' + y + ', 0)'; + return 'translate3d(' + x + 'px, ' + y + 'px, 0)'; } - return 'translate(' + x + ', ' + y + ')'; + return 'translate(' + x + 'px, ' + y + 'px)'; }; // non transition + transform support Item.prototype.goTo = function( x, y ) { this.setPosition( x, y ); @@ -2144,11 +2142,11 @@ return Item; })); /*! - * Outlayer v1.4.1 + * Outlayer v1.4.2 * the brains and guts of a layout library * MIT license */ ( function( window, factory ) { @@ -3578,10 +3576,10 @@ return Item; })); /*! - * Packery v1.4.2 + * Packery v1.4.3 * bin-packing layout library * * Licensed GPLv3 for open source use * or Flickity Commercial License for commercial use *