Browse Source

js : Add isLaidOut prop for no animation on first layout

pull/14/head
David DeSandro 14 years ago
parent
commit
ce28a4d335
  1. 5
      src/jquery.isotope.js

5
src/jquery.isotope.js

@ -304,7 +304,8 @@
// are we animating the layout arrangement? // are we animating the layout arrangement?
// use plugin-ish syntax for css or animate // use plugin-ish syntax for css or animate
var styleFn = ( this.applyStyleFnName === 'animate' && !$.data( this.element, 'isotope' ) ) ?
var styleFn = ( this.applyStyleFnName === 'animate' && !this.isLaidOut ) ?
'css' : this.applyStyleFnName, 'css' : this.applyStyleFnName,
animOpts = this.options.animationOptions; animOpts = this.options.animationOptions;
@ -325,6 +326,8 @@
callback.call( $elems ); callback.call( $elems );
} }
this.isLaidOut = true;
return this; return this;
}, },

Loading…
Cancel
Save