Browse Source

src : round x and y values in _pushPosition

v1.5.13
v1
David DeSandro 13 years ago
parent
commit
e2a5cef346
  1. 16
      jquery.isotope.js
  2. 4
      jquery.isotope.min.js

16
jquery.isotope.js

@ -1,5 +1,5 @@
/**
* Isotope v1.5.12
* Isotope v1.5.13
* An exquisite jQuery plugin for magical layouts
* http://isotope.metafizzy.co
*
@ -9,7 +9,7 @@
* Copyright 2012 David DeSandro / Metafizzy
*/
/*jshint browser: true, curly: true, eqeqeq: true, forin: false, immed: false, newcap: true, noempty: true, strict: true, undef: true */
/*jshint asi: true, browser: true, curly: true, eqeqeq: true, forin: false, immed: false, newcap: true, noempty: true, strict: true, undef: true */
/*global jQuery: false */
(function( window, $, undefined ){
@ -586,8 +586,8 @@
},
_pushPosition : function( $elem, x, y ) {
x += this.offset.left;
y += this.offset.top;
x = Math.round( x + this.offset.left );
y = Math.round( y + this.offset.top );
var position = this.getPositionStyles( x, y );
this.styleQueue.push({ $el: $elem, style: position });
if ( this.options.itemPositionDataEnabled ) {
@ -1051,8 +1051,8 @@
var $this = $(this),
col = props.index % props.cols,
row = Math.floor( props.index / props.cols ),
x = Math.round( ( col + 0.5 ) * props.columnWidth - $this.outerWidth(true) / 2 ),
y = Math.round( ( row + 0.5 ) * props.rowHeight - $this.outerHeight(true) / 2 );
x = ( col + 0.5 ) * props.columnWidth - $this.outerWidth(true) / 2,
y = ( row + 0.5 ) * props.rowHeight - $this.outerHeight(true) / 2;
instance._pushPosition( $this, x, y );
props.index ++;
});
@ -1237,8 +1237,8 @@
var $this = $(this),
col = Math.floor( props.index / props.rows ),
row = props.index % props.rows,
x = Math.round( ( col + 0.5 ) * props.columnWidth - $this.outerWidth(true) / 2 ),
y = Math.round( ( row + 0.5 ) * props.rowHeight - $this.outerHeight(true) / 2 );
x = ( col + 0.5 ) * props.columnWidth - $this.outerWidth(true) / 2,
y = ( row + 0.5 ) * props.rowHeight - $this.outerHeight(true) / 2;
instance._pushPosition( $this, x, y );
props.index ++;
});

4
jquery.isotope.min.js vendored

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