Browse Source

Fixed incorrect state of $allAtoms while removing items

pull/139/head
Lauri Fjällström 13 years ago
parent
commit
d15cbe5e24
  1. 3
      jquery.isotope.js

3
jquery.isotope.js

@ -787,15 +787,14 @@
// removes elements from Isotope widget
remove: function( $content ) {
// remove elements from Isotope instance in callback
var instance = this;
var removeContent = function() {
instance.$allAtoms = instance.$allAtoms.not( $content );
$content.remove();
};
if ( $content.filter( ':not(.' + this.options.hiddenClass + ')' ).length ) {
// if any non-hidden content needs to be removed
this.styleQueue.push({ $el: $content, style: this.options.hiddenStyle });
this.$allAtoms = this.$allAtoms.not( $content );
this.$filteredAtoms = this.$filteredAtoms.not( $content );
this._sort();
this.reLayout( removeContent );

Loading…
Cancel
Save