Browse Source

src : this.layoutMode -> this.options.layoutMode

pull/96/head
David DeSandro 14 years ago
parent
commit
5484fce416
  1. 11
      jquery.isotope.js

11
jquery.isotope.js

@ -766,7 +766,7 @@
// requires columnWidth or rowHeight to be set on namespaced object // requires columnWidth or rowHeight to be set on namespaced object
// i.e. this.masonry.columnWidth = 200 // i.e. this.masonry.columnWidth = 200
_getSegments : function( isRows ) { _getSegments : function( isRows ) {
var namespace = this.layoutMode, var namespace = this.options.layoutMode,
measure = isRows ? 'rowHeight' : 'columnWidth', measure = isRows ? 'rowHeight' : 'columnWidth',
size = isRows ? 'height' : 'width', size = isRows ? 'height' : 'width',
UCSize = isRows ? 'Height' : 'Width', UCSize = isRows ? 'Height' : 'Width',
@ -794,14 +794,13 @@
}, },
_checkIfSegmentsChanged : function( isRows ) { _checkIfSegmentsChanged : function( isRows ) {
var segmentsName = isRows ? 'rows' : 'cols', var namespace = this.options.layoutMode,
prevSegments = this[ this.layoutMode ][ segmentsName ]; segmentsName = isRows ? 'rows' : 'cols',
prevSegments = this[ namespace ][ segmentsName ];
// update cols/rows // update cols/rows
this._getSegments( isRows ); this._getSegments( isRows );
// return if updated cols/rows is not equal to previous // return if updated cols/rows is not equal to previous
var changed = ( this[ this.layoutMode ][ segmentsName ] !== prevSegments ); return ( this[ namespace ][ segmentsName ] !== prevSegments );
console.log( changed );
return changed;
}, },
// ====================== Masonry ====================== // ====================== Masonry ======================

Loading…
Cancel
Save