javascript - Isotope: Resize elements before reLayout -


i want resize elements, in isotope grid.

i dont want happen each time window resizes. want before relayout function of isotope.

is there way can this? callback before relayout?

thanx!

i found way. extending isotope centered masonry mode. in extended resize function, made resize changes on isotope elements, triggered resize(dont know sure if proper way), , did trick.

now everytime isotope wants relayout, before it, resize elements!

here code:

$.isotope.prototype._masonryresizechanged = function () {              //  resize elements              //code sets new width elements              // force relayout             $('#container').isotope( 'relayout');              //rest of overriden method             var prevcolcount = this.masonry.cols;             // updated colcount             this._getcenteredmasonrycolumns();             return ( this.masonry.cols !== prevcolcount );         }; 

Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -