|
|
@ -15,7 +15,7 @@ |
|
|
|
$.Isotope.prototype = { |
|
|
|
$.Isotope.prototype = { |
|
|
|
|
|
|
|
|
|
|
|
options : { |
|
|
|
options : { |
|
|
|
resizeable: true, |
|
|
|
resizable: true, |
|
|
|
layoutMode : 'masonry', |
|
|
|
layoutMode : 'masonry', |
|
|
|
containerClass : 'isotope', |
|
|
|
containerClass : 'isotope', |
|
|
|
itemClass : 'isotope-item', |
|
|
|
itemClass : 'isotope-item', |
|
|
@ -51,8 +51,6 @@ |
|
|
|
// need to get atoms
|
|
|
|
// need to get atoms
|
|
|
|
this.$allAtoms = this._filterFind( this.element.children(), this.options.itemSelector ); |
|
|
|
this.$allAtoms = this._filterFind( this.element.children(), this.options.itemSelector ); |
|
|
|
|
|
|
|
|
|
|
|
// console.log( 'all atoms', this.$allAtoms.length )
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.element.css({ |
|
|
|
this.element.css({ |
|
|
|
overflow : 'hidden', |
|
|
|
overflow : 'hidden', |
|
|
|
position : 'relative' |
|
|
|
position : 'relative' |
|
|
@ -103,13 +101,11 @@ |
|
|
|
instance.element.addClass( instance.options.containerClass ); |
|
|
|
instance.element.addClass( instance.options.containerClass ); |
|
|
|
}, 0 ); |
|
|
|
}, 0 ); |
|
|
|
|
|
|
|
|
|
|
|
// do any layout-specific setup
|
|
|
|
|
|
|
|
// this.width = this.element.width();
|
|
|
|
|
|
|
|
// this._getMasonryColCount();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// bind resize method
|
|
|
|
// bind resize method
|
|
|
|
if ( this.options.resizeable ) { |
|
|
|
if ( this.options.resizable ) { |
|
|
|
$(window).bind('smartresize.isotope', function() { instance.element.isotope('resize') } ); |
|
|
|
$(window).bind( 'smartresize.isotope', function() {
|
|
|
|
|
|
|
|
instance.element.isotope('resize')
|
|
|
|
|
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
@ -194,7 +190,6 @@ |
|
|
|
// apply sort data to $element
|
|
|
|
// apply sort data to $element
|
|
|
|
$this.data( 'isotope-sort-data', sortData ); |
|
|
|
$this.data( 'isotope-sort-data', sortData ); |
|
|
|
// increment element count
|
|
|
|
// increment element count
|
|
|
|
// console.log( instance.elemCount )
|
|
|
|
|
|
|
|
instance.elemCount ++; |
|
|
|
instance.elemCount ++; |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
@ -340,7 +335,6 @@ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
reLayout : function( callback ) { |
|
|
|
reLayout : function( callback ) { |
|
|
|
// console.log( this[ '_' + this.options.layoutMode + 'Reset' ] )
|
|
|
|
|
|
|
|
return this |
|
|
|
return this |
|
|
|
[ '_' + this.options.layoutMode + 'Reset' ]() |
|
|
|
[ '_' + this.options.layoutMode + 'Reset' ]() |
|
|
|
.layout( this.$filteredAtoms, callback ) |
|
|
|
.layout( this.$filteredAtoms, callback ) |
|
|
|