Skip to content

Commit

Permalink
Remove instance argument from dragItemPositioned and `fitComplete…
Browse files Browse the repository at this point in the history
…` events

build v1.4.1
  • Loading branch information
desandro committed Apr 10, 2015
1 parent 0928d53 commit 61c553a
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 13 deletions.
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.4.0",
"version": "1.4.1",
"author": "Metafizzy",
"description": "bin-packing layout library",
"main": "js/packery.js",
Expand Down
4 changes: 4 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

### v1.4.1

+ Remove `instance` argument from `dragItemPositioned` and `fitComplete` events

## v1.4.0

+ Upgraded Outlayer to `v1.4.0`
Expand Down
8 changes: 4 additions & 4 deletions dist/packery.pkgd.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* Packery PACKAGED v1.4.0
* Packery PACKAGED v1.4.1
* bin-packing layout library
*
* Licensed GPLv3 for open source use
Expand Down Expand Up @@ -3532,7 +3532,7 @@ return Item;
}));

/*!
* Packery v1.4.0
* Packery v1.4.1
* bin-packing layout library
*
* Licensed GPLv3 for open source use
Expand Down Expand Up @@ -3851,7 +3851,7 @@ Packery.prototype._bindFitEvents = function( item ) {
if ( ticks != 2 ) {
return;
}
_this.emitEvent( 'fitComplete', [ _this, item ] );
_this.emitEvent( 'fitComplete', [ item ] );
}
// when item is laid out
item.on( 'layout', function() {
Expand Down Expand Up @@ -3996,7 +3996,7 @@ Packery.prototype._getDragEndLayoutComplete = function( elem, item ) {

// emit item drag event now that everything is done
if ( itemNeedsPositioning ) {
_this.emitEvent( 'dragItemPositioned', [ _this, item ] );
_this.emitEvent( 'dragItemPositioned', [ item ] );
}
// listen once
return true;
Expand Down
4 changes: 2 additions & 2 deletions dist/packery.pkgd.min.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions js/packery.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* Packery v1.4.0
* Packery v1.4.1
* bin-packing layout library
*
* Licensed GPLv3 for open source use
Expand Down Expand Up @@ -318,7 +318,7 @@ Packery.prototype._bindFitEvents = function( item ) {
if ( ticks != 2 ) {
return;
}
_this.emitEvent( 'fitComplete', [ _this, item ] );
_this.emitEvent( 'fitComplete', [ item ] );
}
// when item is laid out
item.on( 'layout', function() {
Expand Down Expand Up @@ -463,7 +463,7 @@ Packery.prototype._getDragEndLayoutComplete = function( elem, item ) {

// emit item drag event now that everything is done
if ( itemNeedsPositioning ) {
_this.emitEvent( 'dragItemPositioned', [ _this, item ] );
_this.emitEvent( 'dragItemPositioned', [ item ] );
}
// listen once
return true;
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.4.0",
"version": "1.4.1",
"description": "bin-packing layout library",
"main": "js/packery.js",
"dependencies": {
Expand Down
3 changes: 1 addition & 2 deletions test/unit/fit.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,8 @@ test( '.fit()', function() {
after( then1, fit2 );
}

pckry.on( 'fitComplete', function( pckryInstance, item ) {
pckry.on( 'fitComplete', function( item ) {
ok( true, 'fitComplete event emitted' );
equal( pckryInstance, pckry, 'packery instance returned' );
equal( item, item3, 'item argument returned' );
equal( elem3.style.left, '30px', 'elem3.style.left = 30px' );
isFit = true;
Expand Down

0 comments on commit 61c553a

Please sign in to comment.