From 05d7009023f93dac3265064421dac25adee8bca0 Mon Sep 17 00:00:00 2001 From: David DeSandro Date: Sun, 17 Oct 2010 18:29:23 -0400 Subject: [PATCH] Add reLayout internal method --- src/jquery.molequul.js | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/src/jquery.molequul.js b/src/jquery.molequul.js index f2f0d95..b71ec30 100755 --- a/src/jquery.molequul.js +++ b/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,14 +292,13 @@ 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 @@ -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() { },