Browse Source

check that sortHistory first item

pull/563/head
David DeSandro 12 years ago
parent
commit
377674a136
  1. 3
      isotope.js

3
isotope.js

@ -295,8 +295,7 @@ function isotopeDefinition( Outlayer, getSize, matchesSelector, Item, LayoutMode
var itemSorter = getItemSorter( sortBys, this.options.sortAscending );
this.filteredItems.sort( itemSorter );
// keep track of sortBy History
var lastSortBy = this.sortHistory[ this.sortHistory.length - 1 ];
if ( sortByOpt !== lastSortBy ) {
if ( sortByOpt !== this.sortHistory[0] ) {
// add to front, oldest goes in last
this.sortHistory.unshift( sortByOpt );
}

Loading…
Cancel
Save