Browse Source

build v2.1.1;

require getSize v1.2.2; Ref #827 #860
changelog
pull/850/merge v2.1.1
David DeSandro 10 years ago
parent
commit
5bd5acb7ce
  1. 4
      bower.json
  2. 5
      changelog.md
  3. 85
      dist/isotope.pkgd.js
  4. 4
      dist/isotope.pkgd.min.js
  5. 2
      js/isotope.js
  6. 4
      package.json

4
bower.json

@ -1,6 +1,6 @@
{
"name": "isotope",
"version": "2.1.0",
"version": "2.1.1",
"description": "Filter and sort magical layouts",
"main": [
"js/item.js",
@ -11,7 +11,7 @@
"js/layout-modes/masonry.js"
],
"dependencies": {
"get-size": ">=1.1.8 <1.3",
"get-size": ">=1.2.2 <1.3",
"matches-selector": ">=1 <2",
"outlayer": "1.3.x",
"masonry": "3.2.x"

5
changelog.md

@ -1,5 +1,10 @@
# Changelog
### v2.1.1
+ Refactored hide/reveal logic with filtering
+ Required [getSize](https://github.com/desandro/getsize) v1.2.2. Fixed [#860](https://github.com/metafizzy/isotope/issues/580)
## v2.1.0
+ Add CommonJS support for npm/Browserify

85
dist/isotope.pkgd.js vendored

@ -1,5 +1,5 @@
/*!
* Isotope PACKAGED v2.1.0
* Isotope PACKAGED v2.1.1
* Filter & sort magical layouts
* http://isotope.metafizzy.co
*/
@ -3399,7 +3399,7 @@ if ( typeof define === 'function' && define.amd ) {
})( window );
/*!
* Isotope v2.1.0
* Isotope v2.1.1
* Filter & sort magical layouts
* http://isotope.metafizzy.co
*/
@ -3577,7 +3577,23 @@ function isotopeDefinition( Outlayer, getSize, matchesSelector, Item, LayoutMode
this.option( opts );
this._getIsInstant();
// filter, sort, and layout
this.filteredItems = this._filter( this.items );
// filter
var filtered = this._filter( this.items );
this.filteredItems = filtered.matches;
var _this = this;
function hideReveal() {
_this.reveal( filtered.needReveal );
_this.hide( filtered.needHide );
}
if ( this._isInstant ) {
this._noTransition( hideReveal );
} else {
hideReveal();
}
this._sort();
this._layout();
};
@ -3626,19 +3642,12 @@ function isotopeDefinition( Outlayer, getSize, matchesSelector, Item, LayoutMode
}
}
var _this = this;
function hideReveal() {
_this.reveal( hiddenMatched );
_this.hide( visibleUnmatched );
}
if ( this._isInstant ) {
this._noTransition( hideReveal );
} else {
hideReveal();
}
return matches;
// return collections of items to be manipulated
return {
matches: matches,
needReveal: hiddenMatched,
needHide: visibleUnmatched
};
};
// get a jQuery, function, or a matchesSelector test given the filter
@ -3856,6 +3865,7 @@ function isotopeDefinition( Outlayer, getSize, matchesSelector, Item, LayoutMode
if ( !items.length ) {
return;
}
// filter, layout, reveal new items
var filteredItems = this._filterRevealAdded( items );
// add to filteredItems
this.filteredItems = this.filteredItems.concat( filteredItems );
@ -3867,28 +3877,26 @@ function isotopeDefinition( Outlayer, getSize, matchesSelector, Item, LayoutMode
if ( !items.length ) {
return;
}
// add items to beginning of collection
var previousItems = this.items.slice(0);
this.items = items.concat( previousItems );
// start new layout
this._resetLayout();
this._manageStamps();
// layout new stuff without transition
// filter, layout, reveal new items
var filteredItems = this._filterRevealAdded( items );
// layout previous items
this.layoutItems( previousItems );
// add to filteredItems
this.layoutItems( this.filteredItems );
// add to items and filteredItems
this.filteredItems = filteredItems.concat( this.filteredItems );
this.items = items.concat( this.items );
};
Isotope.prototype._filterRevealAdded = function( items ) {
var filteredItems = this._noTransition( function() {
return this._filter( items );
});
// layout and reveal just the new items
this.layoutItems( filteredItems, true );
this.reveal( filteredItems );
return items;
var filtered = this._filter( items );
this.hide( filtered.needHide );
// reveal all new items
this.reveal( filtered.matches );
// layout new items, no transition
this.layoutItems( filtered.matches, true );
return filtered.matches;
};
/**
@ -3908,24 +3916,7 @@ function isotopeDefinition( Outlayer, getSize, matchesSelector, Item, LayoutMode
this.element.appendChild( item.element );
}
// filter new stuff
/*
// this way adds hides new filtered items with NO transition
// so user can't see if new hidden items have been inserted
var filteredInsertItems;
this._noTransition( function() {
filteredInsertItems = this._filter( items );
// hide all new items
this.hide( filteredInsertItems );
});
// */
// this way hides new filtered items with transition
// so user at least sees that something has been added
var filteredInsertItems = this._filter( items );
// hide all newitems
this._noTransition( function() {
this.hide( filteredInsertItems );
});
// */
var filteredInsertItems = this._filter( items ).matches;
// set flag
for ( i=0; i < len; i++ ) {
items[i].isLayoutInstant = true;

4
dist/isotope.pkgd.min.js vendored

File diff suppressed because one or more lines are too long

2
js/isotope.js

@ -1,5 +1,5 @@
/*!
* Isotope v2.1.0
* Isotope v2.1.1
* Filter & sort magical layouts
* http://isotope.metafizzy.co
*/

4
package.json

@ -1,9 +1,9 @@
{
"name": "isotope-layout",
"version": "2.1.0",
"version": "2.1.1",
"description": "Filter and sort magical layouts",
"dependencies": {
"get-size": ">=1.1.8 <1.3",
"get-size": ">=1.2.2 <1.3",
"desandro-matches-selector": ">=1 <2",
"outlayer": "1.3.x",
"masonry-layout": "3.2.x"

Loading…
Cancel
Save