Browse Source

src : jsHint; use strict; v1.5.01

pull/139/head v1.5.01
David DeSandro 14 years ago
parent
commit
d689c6d39f
  1. 28
      jquery.isotope.js
  2. 6
      jquery.isotope.min.js

28
jquery.isotope.js

@ -1,5 +1,5 @@
/** /**
* Isotope v1.5.0 * Isotope v1.5.01
* An exquisite jQuery plugin for magical layouts * An exquisite jQuery plugin for magical layouts
* http://isotope.metafizzy.co * http://isotope.metafizzy.co
* *
@ -10,10 +10,12 @@
*/ */
/*jshint curly: true, eqeqeq: true, forin: false, immed: false, newcap: true, noempty: true, undef: true */ /*jshint curly: true, eqeqeq: true, forin: false, immed: false, newcap: true, noempty: true, undef: true */
/*global Modernizr: true */ /*global Modernizr: true, jQuery: true */
(function( window, $, undefined ){ (function( window, $, undefined ){
'use strict';
// helper function // helper function
function capitalize(str) { function capitalize(str) {
return str.charAt(0).toUpperCase() + str.slice(1); return str.charAt(0).toUpperCase() + str.slice(1);
@ -251,15 +253,17 @@
} }
// ========================= get transition-end event =============================== // ========================= get transition-end event ===============================
var transitionEndEvent, transitionDurProp;
if ( Modernizr.csstransitions ) { if ( Modernizr.csstransitions ) {
var transitionEndEvent = { transitionEndEvent = {
WebkitTransitionProperty: 'webkitTransitionEnd', // webkit WebkitTransitionProperty: 'webkitTransitionEnd', // webkit
MozTransitionProperty: 'transitionend', MozTransitionProperty: 'transitionend',
OTransitionProperty: 'oTransitionEnd', OTransitionProperty: 'oTransitionEnd',
transitionProperty: 'transitionEnd' transitionProperty: 'transitionEnd'
}[ transitionProp ]; }[ transitionProp ];
var transitionDurProp = getStyleProperty('transitionDuration');
transitionDurProp = getStyleProperty('transitionDuration');
} }
// ========================= smartresize =============================== // ========================= smartresize ===============================
@ -670,7 +674,7 @@
obj.$el[ styleFn ]( obj.style, animOpts ) obj.$el[ styleFn ]( obj.style, animOpts )
// trigger callback at transition end // trigger callback at transition end
.one( transitionEndEvent, callbackFn ); .one( transitionEndEvent, callbackFn );
} };
triggerCallbackNow = false; triggerCallbackNow = false;
} }
} }
@ -680,7 +684,7 @@
$.each( this.styleQueue, processor ); $.each( this.styleQueue, processor );
if ( triggerCallbackNow ) { if ( triggerCallbackNow ) {
callbackFn() callbackFn();
} }
// clear out queue for next time // clear out queue for next time
@ -1012,7 +1016,7 @@
$elems.each( function(){ $elems.each( function(){
var $this = $(this), var $this = $(this),
col = props.index % props.cols, col = props.index % props.cols,
row = ~~( props.index / props.cols ), row = Math.floor( props.index / props.cols ),
x = ( col + 0.5 ) * props.columnWidth - $this.outerWidth(true) / 2, x = ( col + 0.5 ) * props.columnWidth - $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 );
@ -1197,7 +1201,7 @@
props = this.cellsByColumn; props = this.cellsByColumn;
$elems.each( function(){ $elems.each( function(){
var $this = $(this), var $this = $(this),
col = ~~( props.index / props.rows ), col = Math.floor( props.index / props.rows ),
row = props.index % props.rows, row = props.index % props.rows,
x = ( col + 0.5 ) * props.columnWidth - $this.outerWidth(true) / 2, x = ( col + 0.5 ) * props.columnWidth - $this.outerWidth(true) / 2,
y = ( row + 0.5 ) * props.rowHeight - $this.outerHeight(true) / 2; y = ( row + 0.5 ) * props.rowHeight - $this.outerHeight(true) / 2;
@ -1271,8 +1275,8 @@
callback.call( $this, $images ); callback.call( $this, $images );
} }
function imgLoaded() { function imgLoaded( event ) {
if ( --len <= 0 && this.src !== blank ){ if ( --len <= 0 && event.target.src !== blank ){
setTimeout( triggerCallback ); setTimeout( triggerCallback );
$images.unbind( 'load error', imgLoaded ); $images.unbind( 'load error', imgLoaded );
} }
@ -1300,8 +1304,8 @@
// helper function for logging errors // helper function for logging errors
// $.error breaks jQuery chaining // $.error breaks jQuery chaining
var logError = function( message ) { var logError = function( message ) {
if ( this.console ) { if ( window.console ) {
console.error( message ); window.console.error( message );
} }
}; };

6
jquery.isotope.min.js vendored

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