Skip to content

Commit

Permalink
tick version v1.3.2; build dist
Browse files Browse the repository at this point in the history
2015 copyright
dist update eventie 1.0.6
  • Loading branch information
desandro committed Jan 8, 2015
1 parent 78cb312 commit ae963a1
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 21 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,4 @@ Add a class of `js-packery` to your element. Options can be set in JSON in `data

---

Copyright (c) 2014 Metafizzy
Copyright (c) 2015 Metafizzy
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "packery",
"version": "1.3.1",
"version": "1.3.2",
"author": "David DeSandro / Metafizzy",
"description": "bin-packing layout library",
"main": [
Expand Down
48 changes: 36 additions & 12 deletions dist/packery.pkgd.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* Packery PACKAGED v1.3.1
* Packery PACKAGED v1.3.2
* bin-packing layout library
* http://packery.metafizzy.co
*
Expand All @@ -8,7 +8,7 @@
*
* Non-commercial use is licensed under the GPL v3 License
*
* Copyright 2014 Metafizzy
* Copyright 2015 Metafizzy
*/

/**
Expand Down Expand Up @@ -545,7 +545,7 @@ if ( typeof define === 'function' && define.amd ) {
})( window );

/*!
* eventie v1.0.5
* eventie v1.0.6
* event binding helper
* eventie.bind( elem, 'click', myFn )
* eventie.unbind( elem, 'click', myFn )
Expand Down Expand Up @@ -625,7 +625,7 @@ if ( typeof define === 'function' && define.amd ) {
window.eventie = eventie;
}

})( this );
})( window );

/*!
* docReady v1.0.4
Expand Down Expand Up @@ -3357,7 +3357,7 @@ if ( typeof define === 'function' && define.amd ) {
})( window );

/*!
* Packery v1.3.1
* Packery v1.3.2
* bin-packing layout library
* http://packery.metafizzy.co
*
Expand All @@ -3366,18 +3366,25 @@ if ( typeof define === 'function' && define.amd ) {
*
* Non-commercial use is licensed under the GPL v3 License
*
* Copyright 2014 Metafizzy
* Copyright 2015 Metafizzy
*/

( function( window ) {



// -------------------------- Packery -------------------------- //

// used for AMD definition and requires
function packeryDefinition( classie, getSize, Outlayer, Rect, Packer, Item ) {

// ----- Rect ----- //

// allow for pixel rounding errors IE8-IE11 & Firefox; #227
Rect.prototype.canFit = function( rect ) {
return this.width >= rect.width - 1 && this.height >= rect.height - 1;
};

// -------------------------- Packery -------------------------- //

// create an Outlayer layout class
var Packery = Outlayer.create('packery');
Packery.Item = Item;
Expand Down Expand Up @@ -3500,16 +3507,33 @@ Packery.prototype._setRectSize = function( elem, rect ) {
// size for columnWidth and rowHeight, if available
// only check if size is non-zero, #177
if ( w || h ) {
var colW = this.columnWidth + this.gutter;
var rowH = this.rowHeight + this.gutter;
w = this.columnWidth ? Math.ceil( w / colW ) * colW : w + this.gutter;
h = this.rowHeight ? Math.ceil( h / rowH ) * rowH : h + this.gutter;
w = this._applyGridGutter( w, this.columnWidth );
h = this._applyGridGutter( h, this.rowHeight );
}
// rect must fit in packer
rect.width = Math.min( w, this.packer.width );
rect.height = Math.min( h, this.packer.height );
};

/**
* fits item to columnWidth/rowHeight and adds gutter
* @param {Number} measurement - item width or height
* @param {Number} gridSize - columnWidth or rowHeight
* @returns measurement
*/
Packery.prototype._applyGridGutter = function( measurement, gridSize ) {
// just add gutter if no gridSize
if ( !gridSize ) {
return measurement + this.gutter;
}
gridSize += this.gutter;
// fit item to columnWidth/rowHeight
var remainder = measurement % gridSize;
var mathMethod = remainder && remainder < 1 ? 'round' : 'ceil';
measurement = Math[ mathMethod ]( measurement / gridSize ) * gridSize;
return measurement;
};

Packery.prototype._getContainerSize = function() {
if ( this.options.isHorizontal ) {
return {
Expand Down
8 changes: 4 additions & 4 deletions dist/packery.pkgd.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/packery.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* Packery v1.3.1
* Packery v1.3.2
* bin-packing layout library
* http://packery.metafizzy.co
*
Expand All @@ -8,7 +8,7 @@
*
* Non-commercial use is licensed under the GPL v3 License
*
* Copyright 2014 Metafizzy
* Copyright 2015 Metafizzy
*/

( function( window ) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "packery",
"version": "1.3.1",
"version": "1.3.2",
"description": "bin-packing layout library",
"main": "js/packery.js",
"dependencies": {
Expand Down

0 comments on commit ae963a1

Please sign in to comment.