Created
August 24, 2014 02:36
-
-
Save desandro/78bb19987e77ab3cca91 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Modify fitColumns layout mode to not resize container | |
// and support percentage width items | |
var FitColumns = Isotope.LayoutMode.modes.fitColumns; | |
FitColumns.prototype._getContainerSize = function() {}; | |
FitColumns.prototype.needsResizeLayout = function() { | |
// don't trigger if size did not change | |
var size = getSize( this.isotope.element ); | |
if ( this.isotope.size && size ) { | |
return size.innerHeight !== this.isotope.size.innerHeight || | |
size.innerWidth !== this.isotope.size.innerWidth; | |
} else { | |
return false; | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment