Skip to content

Commit

Permalink
⬆️ build v2.0.0
Browse files Browse the repository at this point in the history
📦 refresh .jsons
📝 "Gapless draggable grid layouts" description
  • Loading branch information
desandro committed Feb 16, 2016
1 parent 3027fee commit 82750a1
Show file tree
Hide file tree
Showing 5 changed files with 69 additions and 56 deletions.
31 changes: 24 additions & 7 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,26 +1,43 @@
{
"name": "packery",
"author": "David DeSandro",
"description": "Gapless, draggable layout library",
"description": "Gapless, draggable grid layouts",
"main": "js/packery.js",
"dependencies": {
"get-size": "~2.0.2",
"outlayer": "~2.0.0"
},
"devDependencies": {
"draggabilly": ">=2.1.0 <3",
"draggabilly": "^2.1.0",
"jquery": ">=2 <4",
"jquery-ui-draggable": "https://gist.github.com/4985610.git",
"jquery-bridget": "~2.0.0",
"qunit": "^1.15"
},
"ignore": [
"**/.*",
"test/",
"examples/",
"contributing.md",
"package.json",
"Gruntfile.js",
"sandbox/"
]
"gulpfile.js",
"sandbox/",
"node_modules",
"bower_components",
"test",
"tests"
],
"homepage": "http://packery.metafizzy.co",
"authors": [
"David DeSandro <[email protected]>"
],
"moduleType": [
"amd",
"globals",
"node"
],
"keywords": [
"layout",
"grid",
"draggable"
],
"license": "GPL-3.0"
}
70 changes: 32 additions & 38 deletions dist/packery.pkgd.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*!
* Packery PACKAGED v2.0.0-beta1
* bin-packing layout library
* Packery PACKAGED v2.0.0
* Gapless, draggable grid layouts
*
* Licensed GPLv3 for open source use
* or Packery Commercial License for commercial use
Expand Down Expand Up @@ -365,7 +365,7 @@ return getSize;
});

/**
* EvEmitter v1.0.1
* EvEmitter v1.0.2
* Lil' event emitter
* MIT License
*/
Expand Down Expand Up @@ -419,8 +419,8 @@ proto.once = function( eventName, listener ) {
// set once flag
// set onceEvents hash
var onceEvents = this._onceEvents = this._onceEvents || {};
// set onceListeners array
var onceListeners = onceEvents[ eventName ] = onceEvents[ eventName ] || [];
// set onceListeners object
var onceListeners = onceEvents[ eventName ] = onceEvents[ eventName ] || {};
// set flag
onceListeners[ listener ] = true;

Expand Down Expand Up @@ -488,7 +488,7 @@ return EvEmitter;
// universal module definition
if ( typeof define == 'function' && define.amd ) {
// AMD
define( 'matches-selector/matches-selector',factory );
define( 'desandro-matches-selector/matches-selector',factory );
} else if ( typeof module == 'object' && module.exports ) {
// CommonJS
module.exports = factory();
Expand Down Expand Up @@ -529,21 +529,20 @@ return EvEmitter;
}));

/**
* Fizzy UI utils v2.0.0
* Fizzy UI utils v2.0.1
* MIT license
*/

/*jshint browser: true, undef: true, unused: true, strict: true */

( function( window, factory ) {
/*global define: false, module: false, require: false */
'use strict';
// universal module definition
/*jshint strict: false */ /*globals define, module, require */

if ( typeof define == 'function' && define.amd ) {
// AMD
define( 'fizzy-ui-utils/utils',[
'matches-selector/matches-selector'
'desandro-matches-selector/matches-selector'
], function( matchesSelector ) {
return factory( window, matchesSelector );
});
Expand Down Expand Up @@ -778,28 +777,24 @@ return utils;
'ev-emitter/ev-emitter',
'get-size/get-size'
],
function( EvEmitter, getSize ) {
return factory( window, EvEmitter, getSize );
}
factory
);
} else if ( typeof module == 'object' && module.exports ) {
// CommonJS - Browserify, Webpack
module.exports = factory(
window,
require('ev-emitter'),
require('get-size')
);
} else {
// browser global
window.Outlayer = {};
window.Outlayer.Item = factory(
window,
window.EvEmitter,
window.getSize
);
}

}( window, function factory( window, EvEmitter, getSize ) {
}( window, function factory( EvEmitter, getSize ) {
'use strict';

// ----- helpers ----- //
Expand Down Expand Up @@ -827,13 +822,13 @@ var transitionEndEvent = {
transition: 'transitionend'
}[ transitionProperty ];

// cache all vendor properties
var vendorProperties = [
transformProperty,
transitionProperty,
transitionProperty + 'Duration',
transitionProperty + 'Property'
];
// cache all vendor properties that could have vendor prefix
var vendorProperties = {
transform: transformProperty,
transition: transitionProperty,
transitionDuration: transitionProperty + 'Duration',
transitionProperty: transitionProperty + 'Property'
};

// -------------------------- Item -------------------------- //

Expand Down Expand Up @@ -1047,7 +1042,7 @@ proto._nonTransition = function( args ) {
* @param {Boolean} isCleaning - removes transition styles after transition
* @param {Function} onTransitionEnd - callback
*/
proto._transition = function( args ) {
proto.transition = function( args ) {
// redirect to nonTransition if no transition duration
if ( !parseFloat( this.layout.options.transitionDuration ) ) {
this._nonTransition( args );
Expand Down Expand Up @@ -1093,8 +1088,7 @@ function toDashedAll( str ) {
});
}

var transitionProps = 'opacity,' +
toDashedAll( vendorProperties.transform || 'transform' );
var transitionProps = 'opacity,' + toDashedAll( transformProperty );

proto.enableTransition = function(/* style */) {
// HACK changing transitionProperty during a transition
Expand All @@ -1121,8 +1115,6 @@ proto.enableTransition = function(/* style */) {
this.element.addEventListener( transitionEndEvent, this, false );
};

proto.transition = Item.prototype[ transitionProperty ? '_transition' : '_nonTransition' ];

// ----- events ----- //

proto.onwebkitTransitionEnd = function( event ) {
Expand Down Expand Up @@ -1314,7 +1306,7 @@ return Item;
}));

/*!
* Outlayer v2.0.0
* Outlayer v2.0.1
* the brains and guts of a layout library
* MIT license
*/
Expand Down Expand Up @@ -2690,8 +2682,8 @@ return Item;
}));

/*!
* Packery v2.0.0-beta1
* bin-packing layout library
* Packery v2.0.0
* Gapless, draggable grid layouts
*
* Licensed GPLv3 for open source use
* or Packery Commercial License for commercial use
Expand Down Expand Up @@ -3039,8 +3031,8 @@ proto.resize = function() {
return;
}

if ( this.options.shiftResize ) {
this.resizeShiftLayout();
if ( this.options.shiftPercentResize ) {
this.resizeShiftPercentLayout();
} else {
this.layout();
}
Expand All @@ -3056,7 +3048,7 @@ proto.needsResizeLayout = function() {
return size[ innerSize ] != this.size[ innerSize ];
};

proto.resizeShiftLayout = function() {
proto.resizeShiftPercentLayout = function() {
var items = this._getItemsForLayout( this.items );

var isHorizontal = this._getOption('horizontal');
Expand Down Expand Up @@ -3145,9 +3137,9 @@ proto.updateShiftTargets = function( dropItem ) {
segment = segment && segment + this.gutter;

if ( segment ) {
var segmentSpan = dropItem.rect[ measure ] / segment;
var segmentSpan = Math.ceil( dropItem.rect[ measure ] / segment );
var segs = Math.floor( ( this.shiftPacker[ measure ] + this.gutter ) / segment );
boundsSize = ( segs - ( segmentSpan - 1 ) ) * segment;
boundsSize = ( segs - segmentSpan ) * segment;
// add targets on top
for ( var i=0; i < segs; i++ ) {
this._addShiftTarget( i * segment, 0, boundsSize );
Expand Down Expand Up @@ -3225,6 +3217,8 @@ function getDistance( a, b ) {

// -------------------------- drag move -------------------------- //

var DRAG_THROTTLE_TIME = 120;

/**
* handle an item drag move event
* @param {Element} elem
Expand All @@ -3249,9 +3243,9 @@ proto.itemDragMove = function( elem, x, y ) {

// throttle
var now = new Date();
if ( this._itemDragTime && now - this._itemDragTime < 120 ) {
if ( this._itemDragTime && now - this._itemDragTime < DRAG_THROTTLE_TIME ) {
clearTimeout( this.dragTimeout );
this.dragTimeout = setTimeout( onDrag, 120 );
this.dragTimeout = setTimeout( onDrag, DRAG_THROTTLE_TIME );
} else {
onDrag();
this._itemDragTime = now;
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,6 +1,6 @@
/*!
* Packery v2.0.0-beta1
* bin-packing layout library
* Packery v2.0.0
* Gapless, draggable grid layouts
*
* Licensed GPLv3 for open source use
* or Packery Commercial License for commercial use
Expand Down
12 changes: 7 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
{
"name": "packery",
"version": "2.0.0-beta1",
"description": "Gapless, draggable layout library",
"version": "2.0.0",
"description": "Gapless, draggable grid layouts",
"main": "js/packery.js",
"dependencies": {
"get-size": "~2.0.2",
"outlayer": "~2.0.0"
},
"devDependencies": {
"chalk": "^1.1.1",
"draggabilly": ">=2.1.0 <3",
"draggabilly": "^2.1.0",
"gulp": "^3.9.0",
"gulp-jshint": "^2.0.0",
"gulp-json-lint": "^0.1.0",
"gulp-rename": "^1.2.2",
"gulp-replace": "^0.5.4",
"gulp-requirejs-optimize": "metafizzy/gulp-requirejs-optimize",
"gulp-requirejs-optimize": "github:metafizzy/gulp-requirejs-optimize",
"gulp-uglify": "^1.5.1",
"gulp-util": "^3.0.7",
"jquery": ">=2 <4",
Expand All @@ -41,7 +41,9 @@
"bin",
"binpacking",
"packing",
"masonry"
"masonry",
"gapless",
"draggable"
],
"author": "Metafizzy",
"bugs": {
Expand Down

0 comments on commit 82750a1

Please sign in to comment.