From 64f41d53728a966f10aef6d7ffbc00853d754300 Mon Sep 17 00:00:00 2001 From: yo mama Date: Fri, 13 Feb 2015 02:41:42 -0800 Subject: fixed some basics --- impattern/im/imdither/gallery_isotope_config.js?v | 186 ---------------------- 1 file changed, 186 deletions(-) delete mode 100644 impattern/im/imdither/gallery_isotope_config.js?v (limited to 'impattern/im/imdither/gallery_isotope_config.js?v') diff --git a/impattern/im/imdither/gallery_isotope_config.js?v b/impattern/im/imdither/gallery_isotope_config.js?v deleted file mode 100644 index ab622a9..0000000 --- a/impattern/im/imdither/gallery_isotope_config.js?v +++ /dev/null @@ -1,186 +0,0 @@ - -$.Isotope.prototype._getCenteredMasonryColumns = function() { - this.width = this.element.width(); - - var parentWidth = this.element.parent().width(); - - // i.e. options.masonry && options.masonry.columnWidth - var colW = this.options.masonry && this.options.masonry.columnWidth || - // or use the size of the first item - this.$filteredAtoms.outerWidth(true) || - // if there's no items, use size of container - parentWidth; - - var cols = Math.floor( parentWidth / colW ); - cols = Math.max( cols, 1 ); - - // i.e. this.masonry.cols = .... - this.masonry.cols = cols; - // i.e. this.masonry.columnWidth = ... - this.masonry.columnWidth = colW; - }; - - $.Isotope.prototype._masonryReset = function() { - // layout-specific props - this.masonry = {}; - // FIXME shouldn't have to call this again - this._getCenteredMasonryColumns(); - var i = this.masonry.cols; - this.masonry.colYs = []; - while (i--) { - this.masonry.colYs.push( 0 ); - } - }; - - $.Isotope.prototype._masonryResizeChanged = function() { - var prevColCount = this.masonry.cols; - // get updated colCount - this._getCenteredMasonryColumns(); - return ( this.masonry.cols !== prevColCount ); - }; - - $.Isotope.prototype._masonryGetContainerSize = function() { - var unusedCols = 0, - i = this.masonry.cols; - // count unused columns - while ( --i ) { - if ( this.masonry.colYs[i] !== 0 ) { - break; - } - unusedCols++; - } - - return { - height : Math.max.apply( Math, this.masonry.colYs ), - // fit container to columns that have been used; - width : (this.masonry.cols - unusedCols) * this.masonry.columnWidth - }; - }; - - -//and once the jquery has loaded... -$(function(){ - - var $container = $('#images'); - - - // add randomish size classes - $container.find('.pb').each(function(){ - var $this = $(this); - - number = parseInt( $this.height(), 10 ); - if ( number % 7 % 2 === 1 ) { - $this.addClass('width2'); - } - if ( number % 3 === 0 ) { - $this.addClass('height2'); - } - }); - - $container.isotope({ - itemSelector : '.pb', - sortAscending : false, - masonry : { - columnWidth : 120 - }, - getSortData : { - date : function( $elem ) { - src = $elem.attr('src'); - var re = /_[0-9]{10}/g; - var matches = src.match(re) - for (var i=0;i