Browse Source

Added ability to specify reLayout callback when css transition not supported

- This fixes issue in ie8 where callback isn't fired from reLayout method
pull/419/head
Rhys Evans 12 years ago
parent
commit
41364c7fd2
  1. 15
      jquery.isotope.js

15
jquery.isotope.js

@ -648,12 +648,25 @@
if ( this._isInserting && this.isUsingJQueryAnimation ) {
// if using styleQueue to insert items
var animatedDeferreds = [];
processor = function( i, obj ) {
// only animate if it not being inserted
var deferred = new $.Deferred(),
localAnimOpts = $.extend(true, {}, animOpts, {
complete: function () {
deferred.resolve();
}
})
objStyleFn = obj.$el.hasClass('no-transition') ? 'css' : styleFn;
obj.$el[ objStyleFn ]( obj.style, animOpts );
obj.$el[ objStyleFn ]( obj.style, localAnimOpts );
animatedDeferreds.push(deferred);
};
$.when.apply($, animatedDeferreds).then(function () {
callback && callback();
});
} else if ( callback || onLayout || animOpts.complete ) {
// has callback
var isCallbackTriggered = false,

Loading…
Cancel
Save