diff --git a/_includes/layout-options.html b/_includes/layout-options.html
index f8dfa5e..1d950c7 100644
--- a/_includes/layout-options.html
+++ b/_includes/layout-options.html
@@ -8,4 +8,5 @@
masonryHorizontal
fitColumns
cellsByColumn
+ straightAcross
\ No newline at end of file
diff --git a/_posts/docs/2010-12-05-layout-modes.mdown b/_posts/docs/2010-12-05-layout-modes.mdown
index 4dde12e..4b436c1 100644
--- a/_posts/docs/2010-12-05-layout-modes.mdown
+++ b/_posts/docs/2010-12-05-layout-modes.mdown
@@ -12,6 +12,8 @@ toc:
- { title: fitRows, anchor: fitrows }
- { title: masonry, anchor: masonry }
- { title: masonryHorizontal, anchor: masonryhorizontal }
+ - { title: straightAcross, anchor: straightacross }
+ - { title: straightDown, anchor: straightdown }
- { title: Horizontal layouts, anchor: horizontal_layouts }
---
@@ -152,13 +154,17 @@ $('#container').isotope({
{% endhighlight %}
+## straightAcross
+
+Item elements are arranged horizontally left to right. Useful for simple lists.
+
## straightDown
Item elements are arranged vertically top to bottom. Useful for simple lists.
## Horizontal layouts
-Horizontal layout modes (masonryHorizontal, fitColumns, and cellsByColumn) need a container that has a height value. Be sure that your CSS has height set.
+Horizontal layout modes (masonryHorizontal, fitColumns, cellsByColumn, and straightAcross) need a container that has a height value. Be sure that your CSS has height set.
{% highlight css %}
diff --git a/jquery.isotope.js b/jquery.isotope.js
index 2d1abba..672f37a 100644
--- a/jquery.isotope.js
+++ b/jquery.isotope.js
@@ -1,5 +1,5 @@
/**
- * Isotope v1.2.110516
+ * Isotope v1.2.110520
* An exquisite jQuery plugin for magical layouts
* http://isotope.metafizzy.co
*
@@ -9,9 +9,6 @@
* Copyright 2011 David DeSandro / Metafizzy
*/
-/*jshint forin: false */
-/*global jQuery: true, Modernizr: true */
-
(function( window, $, undefined ){
// ========================= getStyleProperty by kangax ===============================
@@ -1200,7 +1197,36 @@
this.reLayout();
}
return this;
- }
+ },
+
+ // ====================== straightAcross ======================
+
+ _straightAcrossReset : function() {
+ this.straightAcross = {
+ x : 0
+ };
+ return this;
+ },
+
+ _straightAcrossLayout : function( $elems ) {
+ var instance = this;
+ $elems.each( function( i ){
+ var $this = $(this),
+ x = instance.straightAcross.x + instance.posLeft;
+ instance._pushPosition( $this, x, instance.posTop );
+ instance.straightAcross.x += $this.outerWidth(true);
+ });
+ return this;
+ },
+
+ _straightAcrossGetContainerSize : function() {
+ return { width : this.straightAcross.x + this.posLeft };
+ },
+
+ _straightAcrossResize : function() {
+ this.reLayout();
+ return this;
+ }
};
diff --git a/jquery.isotope.min.js b/jquery.isotope.min.js
index 282158c..3c6b01c 100644
--- a/jquery.isotope.min.js
+++ b/jquery.isotope.min.js
@@ -1,5 +1,5 @@
/**
- * Isotope v1.2.110516
+ * Isotope v1.2.110520
* An exquisite jQuery plugin for magical layouts
* http://isotope.metafizzy.co
*
@@ -8,4 +8,4 @@
*
* Copyright 2011 David DeSandro / Metafizzy
*/
-/*jshint forin: false *//*global jQuery: true, Modernizr: true */(function(a,b,c){var d=function(){function b(b,c){c=c||document.documentElement;var d=c.style,e;if(typeof d[b]=="string")return b;b=b.charAt(0).toUpperCase()+b.slice(1);for(var f=0,g=a.length;fg?1:fc.width&&(c.fitRows.x=0,c.fitRows.y=c.fitRows.height),f=c.fitRows.x+c.posLeft,g=c.fitRows.y+c.posTop,c._pushPosition(a,f,g),c.fitRows.height=Math.max(c.fitRows.y+e,c.fitRows.height),c.fitRows.x+=d});return this},_fitRowsReset:function(){this.fitRows={x:0,y:0,height:0};return this},_fitRowsGetContainerSize:function(){return{height:this.fitRows.height}},_fitRowsResize:function(){return this.reLayout()},_cellsByRowReset:function(){this.cellsByRow={},this._getSegments("cellsByRow"),this.cellsByRow.rowHeight=this.options.cellsByRow.rowHeight||this.$allAtoms.outerHeight(!0);return this},_cellsByRowLayout:function(a){var c=this,d=this.cellsByRow.cols;this.cellsByRow.atomsLen=a.length,a.each(function(a){var e=b(this),f=(a%d+.5)*c.cellsByRow.columnWidth-e.outerWidth(!0)/2+c.posLeft,g=(~~(a/d)+.5)*c.cellsByRow.rowHeight-e.outerHeight(!0)/2+c.posTop;c._pushPosition(e,f,g)});return this},_cellsByRowGetContainerSize:function(){return{height:Math.ceil(this.cellsByRow.atomsLen/this.cellsByRow.cols)*this.cellsByRow.rowHeight+this.posTop}},_cellsByRowResize:function(){var a=this.cellsByRow.cols;this._getSegments("cellsByRow"),this.cellsByRow.cols!==a&&this.reLayout();return this},_straightDownReset:function(){this.straightDown={y:0};return this},_straightDownLayout:function(a){var c=this;a.each(function(a){var d=b(this),e=c.straightDown.y+c.posTop;c._pushPosition(d,c.posLeft,e),c.straightDown.y+=d.outerHeight(!0)});return this},_straightDownGetContainerSize:function(){return{height:this.straightDown.y+this.posTop}},_straightDownResize:function(){this.reLayout();return this},_masonryHorizontalPlaceBrick:function(a,b,c){var d=Math.min.apply(Math,c),e=d+a.outerWidth(!0),f=c.length,g=f,h=this.masonryHorizontal.rows+1-f,i,j;while(f--)c[f]===d&&(g=f);i=d,j=this.masonryHorizontal.rowHeight*g+this.posTop,this._pushPosition(a,i,j);for(f=0;fc.height&&(c.fitColumns.x=c.fitColumns.width,c.fitColumns.y=0),f=c.fitColumns.x+c.posLeft,g=c.fitColumns.y+c.posTop,c._pushPosition(a,f,g),c.fitColumns.width=Math.max(c.fitColumns.x+d,c.fitColumns.width),c.fitColumns.y+=e});return this},_fitColumnsGetContainerSize:function(){return{width:this.fitColumns.width}},_fitColumnsResize:function(){return this.reLayout()},_cellsByColumnReset:function(){this.cellsByColumn={},this._getSegments("cellsByColumn",!0),this.cellsByColumn.columnWidth=this.options.cellsByColumn.columnWidth||this.$allAtoms.outerHeight(!0);return this},_cellsByColumnLayout:function(a){var c=this,d=this.cellsByColumn.rows;this.cellsByColumn.atomsLen=a.length,a.each(function(a){var e=b(this),f=(~~(a/d)+.5)*c.cellsByColumn.columnWidth-e.outerWidth(!0)/2+c.posLeft,g=(a%d+.5)*c.cellsByColumn.rowHeight-e.outerHeight(!0)/2+c.posTop;c._pushPosition(e,f,g)});return this},_cellsByColumnGetContainerSize:function(){return{width:Math.ceil(this.cellsByColumn.atomsLen/this.cellsByColumn.rows)*this.cellsByColumn.columnWidth+this.posLeft}},_cellsByColumnResize:function(){var a=this.cellsByColumn.rows;this._getSegments("cellsByColumn",!0),this.cellsByColumn.rows!==a&&this.reLayout();return this}},b.fn.imagesLoaded=function(a){var b=this.find("img"),d=b.length,e=this;b.length||a.call(this),b.bind("load",function(){--d<=0&&a.call(e)}).each(function(){if(this.complete||this.complete===c){var a=this.src;this.src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==",this.src=a}});return this},b.fn.isotope=function(a){if(typeof a=="string"){var c=Array.prototype.slice.call(arguments,1);return this.each(function(){var d=b.data(this,"isotope");if(!d)return b.error("cannot call methods on isotope prior to initialization; attempted to call method '"+a+"'");if(!b.isFunction(d[a])||a.charAt(0)==="_")return b.error("no such method '"+a+"' for isotope instance");d[a].apply(d,c)})}return this.each(function(){var c=b.data(this,"isotope");c?c.option(a||{})._init():b.data(this,"isotope",new b.Isotope(a,this))})}})(window,jQuery);
+(function(a,b,c){var d=function(){function b(b,c){c=c||document.documentElement;var d=c.style,e;if(typeof d[b]=="string")return b;b=b.charAt(0).toUpperCase()+b.slice(1);for(var f=0,g=a.length;fg?1:fc.width&&(c.fitRows.x=0,c.fitRows.y=c.fitRows.height),f=c.fitRows.x+c.posLeft,g=c.fitRows.y+c.posTop,c._pushPosition(a,f,g),c.fitRows.height=Math.max(c.fitRows.y+e,c.fitRows.height),c.fitRows.x+=d});return this},_fitRowsReset:function(){this.fitRows={x:0,y:0,height:0};return this},_fitRowsGetContainerSize:function(){return{height:this.fitRows.height}},_fitRowsResize:function(){return this.reLayout()},_cellsByRowReset:function(){this.cellsByRow={},this._getSegments("cellsByRow"),this.cellsByRow.rowHeight=this.options.cellsByRow.rowHeight||this.$allAtoms.outerHeight(!0);return this},_cellsByRowLayout:function(a){var c=this,d=this.cellsByRow.cols;this.cellsByRow.atomsLen=a.length,a.each(function(a){var e=b(this),f=(a%d+.5)*c.cellsByRow.columnWidth-e.outerWidth(!0)/2+c.posLeft,g=(~~(a/d)+.5)*c.cellsByRow.rowHeight-e.outerHeight(!0)/2+c.posTop;c._pushPosition(e,f,g)});return this},_cellsByRowGetContainerSize:function(){return{height:Math.ceil(this.cellsByRow.atomsLen/this.cellsByRow.cols)*this.cellsByRow.rowHeight+this.posTop}},_cellsByRowResize:function(){var a=this.cellsByRow.cols;this._getSegments("cellsByRow"),this.cellsByRow.cols!==a&&this.reLayout();return this},_straightDownReset:function(){this.straightDown={y:0};return this},_straightDownLayout:function(a){var c=this;a.each(function(a){var d=b(this),e=c.straightDown.y+c.posTop;c._pushPosition(d,c.posLeft,e),c.straightDown.y+=d.outerHeight(!0)});return this},_straightDownGetContainerSize:function(){return{height:this.straightDown.y+this.posTop}},_straightDownResize:function(){this.reLayout();return this},_masonryHorizontalPlaceBrick:function(a,b,c){var d=Math.min.apply(Math,c),e=d+a.outerWidth(!0),f=c.length,g=f,h=this.masonryHorizontal.rows+1-f,i,j;while(f--)c[f]===d&&(g=f);i=d,j=this.masonryHorizontal.rowHeight*g+this.posTop,this._pushPosition(a,i,j);for(f=0;fc.height&&(c.fitColumns.x=c.fitColumns.width,c.fitColumns.y=0),f=c.fitColumns.x+c.posLeft,g=c.fitColumns.y+c.posTop,c._pushPosition(a,f,g),c.fitColumns.width=Math.max(c.fitColumns.x+d,c.fitColumns.width),c.fitColumns.y+=e});return this},_fitColumnsGetContainerSize:function(){return{width:this.fitColumns.width}},_fitColumnsResize:function(){return this.reLayout()},_cellsByColumnReset:function(){this.cellsByColumn={},this._getSegments("cellsByColumn",!0),this.cellsByColumn.columnWidth=this.options.cellsByColumn.columnWidth||this.$allAtoms.outerHeight(!0);return this},_cellsByColumnLayout:function(a){var c=this,d=this.cellsByColumn.rows;this.cellsByColumn.atomsLen=a.length,a.each(function(a){var e=b(this),f=(~~(a/d)+.5)*c.cellsByColumn.columnWidth-e.outerWidth(!0)/2+c.posLeft,g=(a%d+.5)*c.cellsByColumn.rowHeight-e.outerHeight(!0)/2+c.posTop;c._pushPosition(e,f,g)});return this},_cellsByColumnGetContainerSize:function(){return{width:Math.ceil(this.cellsByColumn.atomsLen/this.cellsByColumn.rows)*this.cellsByColumn.columnWidth+this.posLeft}},_cellsByColumnResize:function(){var a=this.cellsByColumn.rows;this._getSegments("cellsByColumn",!0),this.cellsByColumn.rows!==a&&this.reLayout();return this},_straightAcrossReset:function(){this.straightAcross={x:0};return this},_straightAcrossLayout:function(a){var c=this;a.each(function(a){var d=b(this),e=c.straightAcross.x+c.posLeft;c._pushPosition(d,e,c.posTop),c.straightAcross.x+=d.outerWidth(!0)});return this},_straightAcrossGetContainerSize:function(){return{width:this.straightAcross.x+this.posLeft}},_straightAcrossResize:function(){this.reLayout();return this}},b.fn.imagesLoaded=function(a){var b=this.find("img"),d=b.length,e=this;b.length||a.call(this),b.bind("load",function(){--d<=0&&a.call(e)}).each(function(){if(this.complete||this.complete===c){var a=this.src;this.src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==",this.src=a}});return this},b.fn.isotope=function(a){if(typeof a=="string"){var c=Array.prototype.slice.call(arguments,1);return this.each(function(){var d=b.data(this,"isotope");if(!d)return b.error("cannot call methods on isotope prior to initialization; attempted to call method '"+a+"'");if(!b.isFunction(d[a])||a.charAt(0)==="_")return b.error("no such method '"+a+"' for isotope instance");d[a].apply(d,c)})}return this.each(function(){var c=b.data(this,"isotope");c?c.option(a||{})._init():b.data(this,"isotope",new b.Isotope(a,this))})}})(window,jQuery);