From 3616cfe1d96fcc1bae7ea151201ba445eb83f28b Mon Sep 17 00:00:00 2001 From: David DeSandro Date: Mon, 3 Jan 2011 23:51:00 -0500 Subject: [PATCH] src : add verticalList layout --- src/jquery.isotope.js | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/src/jquery.isotope.js b/src/jquery.isotope.js index 67f774c..7afe136 100755 --- a/src/jquery.isotope.js +++ b/src/jquery.isotope.js @@ -665,6 +665,39 @@ return this; } }); + + + // ====================== verticalList ====================== + + $.extend( $.Isotope.prototype, { + + _verticalListReset : function() { + this.verticalList = { + y : 0 + }; + return this; + }, + + _verticalListLayout : function( $elems ) { + var instance = this; + $elems.each( function( i ){ + var $this = $(this), + y = instance.verticalList.y + instance.posTop; + instance._pushPosition( $this, instance.posLeft, y ); + instance.verticalList.y += $this.outerHeight(true) + }); + return this; + }, + + _verticalListGetContainerSize : function() { + return { height : this.verticalList.y + this.posTop }; + }, + + _verticalListResize : function() { + this.reLayout(); + return this; + } + }); // ====================== masonryHorizontal ======================