Browse Source

Add reLayout internal method

pull/14/head
David DeSandro 14 years ago
parent
commit
05d7009023
  1. 18
      src/jquery.molequul.js

18
src/jquery.molequul.js

@ -227,9 +227,7 @@
this.molequul( 'getMasonryColCount', props );
if ( props.colCount !== prevColCount ) {
// if column count has changed, do a new column cound
this
.molequul( 'masonryResetLayoutProps', props )
.molequul( 'layout', props.atoms.$filtered );
this.molequul( 'reLayout', props );
}
return this;
@ -294,15 +292,14 @@
clearFloatResize : function( props ) {
props.width = this.width();
return this
.molequul( 'clearFloatResetLayoutProps', props )
.molequul( 'layout', props.atoms.$filtered );
return this.molequul( 'reLayout', props );
},
// ====================== General Methods ======================
// used on collection of cards (should be filtered, and sorted before )
// accepts cards-to-be-laid-out and colYs to start with
layout : function( $elems, callback ) {
@ -356,11 +353,18 @@
resize : function() {
var props = this.data('molequul');
props.initialized = true;
return this.molequul( props.opts.layoutMode + 'Resize', props );
},
reLayout : function( props ) {
props = props || this.data('molequul');
props.initialized = true;
return this
.molequul( props.opts.layoutMode + 'ResetLayoutProps', props )
.molequul( 'layout', props.atoms.$filtered );
},
append : function() {
},

Loading…
Cancel
Save