Browse Source

src : minor refactoring after offset change; minify;

pull/96/head
David DeSandro 14 years ago
parent
commit
af4d0faa28
  1. 20
      jquery.isotope.js
  2. 4
      jquery.isotope.min.js

20
jquery.isotope.js

@ -1,5 +1,5 @@
/** /**
* Isotope v1.3.110523 * Isotope v1.3.110524
* An exquisite jQuery plugin for magical layouts * An exquisite jQuery plugin for magical layouts
* http://isotope.metafizzy.co * http://isotope.metafizzy.co
* *
@ -981,9 +981,8 @@
_straightDownLayout : function( $elems ) { _straightDownLayout : function( $elems ) {
var instance = this; var instance = this;
$elems.each( function( i ){ $elems.each( function( i ){
var $this = $(this), var $this = $(this);
y = instance.straightDown.y; instance._pushPosition( $this, 0, instance.straightDown.y );
instance._pushPosition( $this, 0, y );
instance.straightDown.y += $this.outerHeight(true); instance.straightDown.y += $this.outerHeight(true);
}); });
}, },
@ -1145,10 +1144,8 @@
var $this = $(this), var $this = $(this),
col = ~~( props.index / props.rows ), col = ~~( props.index / props.rows ),
row = props.index % props.rows, row = props.index % props.rows,
x = ( col + 0.5 ) * props.columnWidth - x = ( col + 0.5 ) * props.columnWidth - $this.outerWidth(true) / 2,
$this.outerWidth(true) / 2, y = ( row + 0.5 ) * props.rowHeight - $this.outerHeight(true) / 2;
y = ( row + 0.5 ) * props.rowHeight -
$this.outerHeight(true) / 2;
instance._pushPosition( $this, x, y ); instance._pushPosition( $this, x, y );
props.index ++; props.index ++;
}); });
@ -1173,15 +1170,14 @@
_straightAcrossLayout : function( $elems ) { _straightAcrossLayout : function( $elems ) {
var instance = this; var instance = this;
$elems.each( function( i ){ $elems.each( function( i ){
var $this = $(this), var $this = $(this);
x = instance.straightAcross.x; instance._pushPosition( $this, instance.straightAcross.x, 0 );
instance._pushPosition( $this, x, 0 );
instance.straightAcross.x += $this.outerWidth(true); instance.straightAcross.x += $this.outerWidth(true);
}); });
}, },
_straightAcrossGetContainerSize : function() { _straightAcrossGetContainerSize : function() {
return { width : this.straightAcross.x + this.offset.left }; return { width : this.straightAcross.x };
}, },
_straightAcrossResizeChanged : function() { _straightAcrossResizeChanged : function() {

4
jquery.isotope.min.js vendored

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save